FROM : Lorenzo
DATE : Thu Dec 02 18:25:25 2004
Hi,
in my outlineView, when I quit and release the mainNode object, I can see
that every item of my nodeTree gets released properly. Good.
But this happens only if all the nodes are collapsed. In facts, if some node
is expanded, it and all of its children don't get released.
In order to release all the nodes properly, I have made a trick: before
deallocating the mainNode object I set gQuit to YES and I do this:
- (int)outlineView:(NSOutlineView*)olv numberOfChildrenOfItem:(id)item
{
if (gQuit) return 0;
else return [item numberOfChildren];
}
It works well.
Do you think it is a good manner to solve this problem? Or do you know a
better solution?
Best Regards
--
Lorenzo
email: <email_removed>
DATE : Thu Dec 02 18:25:25 2004
Hi,
in my outlineView, when I quit and release the mainNode object, I can see
that every item of my nodeTree gets released properly. Good.
But this happens only if all the nodes are collapsed. In facts, if some node
is expanded, it and all of its children don't get released.
In order to release all the nodes properly, I have made a trick: before
deallocating the mainNode object I set gQuit to YES and I do this:
- (int)outlineView:(NSOutlineView*)olv numberOfChildrenOfItem:(id)item
{
if (gQuit) return 0;
else return [item numberOfChildren];
}
It works well.
Do you think it is a good manner to solve this problem? Or do you know a
better solution?
Best Regards
--
Lorenzo
email: <email_removed>
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

