i have a function
Code:
so in something function it is getting a bad memory error how do this ?
i need to init the same object again and again ....
how do i do that again ?
any help
Code:
Code:
// this is the header
@interface MyClass
{
theclass * obj;
}
// this is the .m file
-(void) doSomething{
obj=[[theclass alloc] init];
}
-(void)something{
theclass=nil;
obj=[[theclass alloc] init];
}
i need to init the same object again and again ....
how do i do that again ?
any help