Question regarding NSView's drawRect
Question regarding NSView's drawRect
- Subject: Question regarding NSView's drawRect
- From: "David Chan" <email@hidden>
- Date: Mon, 30 Oct 2006 15:28:45 +0800
Hi all, I have a question regarding NSView. I have an application that
keep many subclassed NSView objects. Users shall be able to navigate
around and depending on their action, certain NSView objects will be
shown and other will be hidden or moved to other window
Now.. I actually only need to use drawRect once for every object -
when I first created the objects. I will neither need to scroll nor do
anything that will require redrawing of the NSView objects. By right,
it should be safe to release all the image data objects I use after
the drawRect returns; and that is my intention in order to minimize
the memory usage. But it seems that there are certain occasions where
the Application would call drawRect on its own. This will be a problem
because all the image data will no longer be there.
So my question is.. Is it possible for me to intercept this so that
the drawRect will not be called? Or maybe there can be other
workaround so that my App will not need to redraw the NSView
unnecessarily?
Thanks a lot for your attention.
Regards,
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden