Hello,
I’d like to replace the contents of a controller before inserting new items. I use ARC, do I don’t have to worry about memory leaks but I wanted to know the better way to do this (giving that I don’t want to have the content array in my properties if it’s not really useful).
In ASOC it would be:
set myArrayController’s arrangedObjects() to {} //GC will take “care” of the discarded objects.
And in ObjC? For the moment I use:
[myArrayController removeObjects:[myArrayController arrangedObjects]]; :/
I’m using an unique window for multiple documents. In a NSDocument application, as there is one controller per doc, this wouldn’t be necessary.
Is it safe? Is there a better way?
Regards,