objective c - storing objects in stl containers in a garbage collect environment -


i have mac os x app need store objective-c objects in stl containers (as pointers). works fine until compile program garbage collection "supported" due custom framework need use.

problem objects stored in stl containers released. there way tell compiler not collect away , i'll release them when i'm done them?

is possible? there way have framework uses garbage collection , main program doesn't? solve problem. can recompile framework, heavily relies on gc.

you can disable garbage collection individual objects using nsgarbagecollector's disablecollectorforpointer: method. hang around until call -enablecollectorforpointer: on it.

i believe (but i'm not totally sure) can use cfretain/cfrelease on nsobject subclasses more or less same effect.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -