logo       

how to prevent objects from being garbage collected.: msg#00121

programming.swig

Subject: how to prevent objects from being garbage collected.

hi,

is there a way to prevent objects from being destructed by the ruby garbage collector or at the end of the script, without having to write markfunks for the owner of these objects?

also user defined markfuncs for the containers would not help me with the problem at the end of the script, i think.

when ruby exits, all objects will be deleted and their C++ destructors get called. if objects that are owned by others (in C++) are deleted bevore their owners the owners will try to free them again and that leads to memory access errors.

how can i tell ruby to not call the destructor of certain objects??
maybe i didn't understand something right, so please clarify.

any comments are very appreciated!!
thanks,
- henon
_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise