Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Auto-dispose for widgets #9387
Following on from #9375 by @iceteagroup, disposing of widgets manually causes the same problems as having to manually dispose ordinary objects - IMHO it arises less often only because many applications never remove widgets from their UI.
A clean solution will be to make wigets auto-dispose; I think that this may be possible by delaying registering widgets in
However, the key principal with auto-dispose is that the destructor does not do anything of any significance and the difficulty is that widgets often only do cleanup when they are destroyed - eg
This should be fine for backwards compatibility because any existing user code which removed objects will either call
There are a number of references under