I have a viewcontroller which can't be released since it is a subclass with extra functionality... Anyway there are many of them, and I need the views to be released when they go offscreen.
removeFromSuperView vanishes the views but they remain in memory. The only way I can get rid of the view from memory is to completely dealloc it. However, when I access viewcontroller.view, it is just going to create the view again, isn't it?
The views themselves don't take up any significant memory until they are drawn for the first time, so...
Ideally I will have an array of views I can [ copy] into viewcontroller.view when they are needed (onscreen) and release completely to dealloc when they go offscreen, so that Cocoa knows to get rid of whatever internal graphics memory it is allocating.
Any thoughts?
Thanks