Hello,
I am trying to access some memory, belonging to an instance, from a class method.
That is, I am trying to access pdb, from doHistory.
I understand I can't do that, but how can I access pdb from doHistory? Is there any other way?
Thank you,
Simão
I am trying to access some memory, belonging to an instance, from a class method.
That is, I am trying to access pdb, from doHistory.
I understand I can't do that, but how can I access pdb from doHistory? Is there any other way?
Thank you,
Simão
Code:
-(id) initWithDB: (BatMeasureDB*)pdb
{
[super init];
BatMeasureDB* pdb = [BatMeasureDB alloc] init];
[NSThread detachNewThreadSelector:@selector(doHistory:withDB:) toTarget:[BatWatcher class] withObject:pdb];
return self;
}
+(void) doHistory:(id)param withDB:(BatMeasureDB*)db
{
[db toString];
}