Wound:
applegame @ , scope(exit), . TTF_Quit . , TTF_Quit .
/ , GC.
applegame @ , :
AFTER the scope(exit) statements
AFTER exit from the function scope
scope(exit) .
, . ? :
, - De, scope(exit), , GC , , .
scope(exit) - , . scope(exit) - , , .
applegame @ scope(exit) delete(ptr) . - , , ?
, RAII . , ? delete ptr - .
, . . unique_ptr, , .
applegame @ . . return, ( unique_ptr , ), , . .
, . unique_ptr, RAII , . , ? , ?
applegame @ . D . scope(exit) GC. !
, ? , :-?
applegame @ . - scope(exit) - .
, . :D
applegame @ , scope(...) . GC GC. scope(...)?
finally GC . , , ? scope(exit), PQExec :D
applegame @ , ?
.
applegame @ , . - , . , C# try-catch-finally. , finally try-catch, try-finally catch.
, . Java . . Finally . , , ;)
applegame @ , RAII . RAII, scope(exit), , ,
, , !

. .
https://forum.sources.ru/index.php?showtopic=362619&view=findpost&p=3834548