Re: Problems with signals and object destruction

Joe Smith kirjoitti:
muppet wrote:
The situations you want to watch out for are:

- Any form of circular reference.  Avoid keeping references to yourself.
- Take care with closures, and they can hide references to objects and create reference cycles.
- NEVER override DESTROY on a Glib::Object, ...

I've had a long time problem with this, but now I think I'm starting to win the battle. My approach now is to use a specific close() methods with problematic classes and explicitly delete widgets there. I've found that compiling Glib with #define NOISY and using that for checking that widgets get deleted _before_ global destruction is a good idea.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]