I have gone through the following question.
http://stackoverflow.com/questions/1528696/objective-c-where-do-you-dealloc-global-static-variables
But the question is related on static variables. It has something different situation then mine.
I have following code in application.
//.h file
#import "cocos2d.h"
#import "something.h"
#import "myLayer.h"
#import "LayerData.h"
// i have taken this variables as global
// because two different classes are simultaneously accessing it
myLayer *myCurrentLayer;
LayerData *boxLayerData[10][12];
@interface one
// my class definition here
@end
@interface two
// my second class definition here
@end
//------------------------------------------------
@implementation one
// my class constructor here.
-(id)init{
myCurrentLayer=[[myLayer alloc] init];
// boxLayerData is initialized with objects
}
@end
@implementation two
// second class constructor
-(id)init{
[myCurrentLayer setPosition:ccp(10,20)];
[self schedule something for movements];
}
@end
//------------------------------------------------
Ok. A confusion is "how to dealloc 120 sized "LayerData *boxLayerData[10][12];" array ?"
Plz. Give some suggestion.
Thanks in advance.
Sagar.