In my code, i have a class , mainClass , which has an instance method -(void)record .
In the interface of mainClass , i have instance variable,which used by this method.
Now, i know that every time i am creating a new instance of the class with :
mainClass *instance=[mainClass alloc];
its creating a new place in memory to all this class variables , and now if i do
[instance record];
it will create all the variables that are in record but they will be new once.
Now lets say i want to call from an outside class to record , and change/use its variables
not create new once, but use the once already created in the mainClass.
whats the best way of doing this, and what it has to do with a class method ? Should this method be a class method? if yes , why ?