CocoaWidgetImpl has a virtual destructor... I would place a release in it for the m_view you hold within.
The Cocoa framework is based on a refCount system. This is implemented thanks to the [OBJECT alloc] and the [OBJECT release] methods. But if you take a value (like "view") and want to store it on a long term basis (as in the "SetView" of CocoaWidgetImpl) you need to RETAIN it by calling a method like [OBJECT retain]. And after using this variable and no longer needing it, you call [OBJECT release] or [OBJECT autorelease].
Log in to post a comment.