I'm trying to figure out why I've got a leak with GST. It's about a C++ program hosting smalltalk as script language. Let's say you've got this scenario:
class Something:
OOP app
Init():
gst_initialize( NULL, NULL, GST_NO_TTY )
// add classes and stuff
app = gst_perform( classApp, selectorNew ) // calls also init
gst_register_oop( app );
CleanUp():
app = gst_perform( classApp, selectorCleanup ) // calls cleanup
gst_unregister_oop( app );
// clean up classes and stugg
gst_invoke_hook( GST_ABOUT_TO_QUIT )
Furthermore let's say a smalltalk script does something simple like this:
MyApp subclass: App [
| x |
init [ x := CEnabledClass new ]
cleanup [ x := nil ]
No other object stores a reference to x for this simple test. Now x is
always leaking. Furthermore OOP app is leaking (if I set it to call
finalize and printf on finalize[] nothing happens).
I can verify that if X is created somewhere in smalltalk function and
going out of scope it is properly destroyed if not used and does not leak.
If assigned to OOP app x leaks because OOP app is not freed. Most
probably OOP app is simply not garbage collected in that short time?
Is there a way to force garbage collection before shutting down?
--
Yours sincerely
Plüss Roland
Leader and Head Programmer
- Game: Epsylon ( http://www.indiedb.com/games/epsylon )
- Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine
, http://dragengine.rptd.ch/wiki )
- Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php )
- As well as various Blender export scripts und game tools
signature.asc
Description: OpenPGP digital signature
_______________________________________________ help-smalltalk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-smalltalk
