i working heavily on memory fineturning , of problems solved of stackoverflow. got struck serious memory leak nsmutablearray initialization.
- (nsmutablearray *)children { if (!_children) { _children = [nsmutablearray new]; // <-- here memory leak } return _children; }
- i working project using 100% arc.
- perticular class initialization not triggered none other main thread (no threading has been used).
- but... place using recurtion
moreover statments
@property (strong, nonatomic) nsmutablearray *children;
@synthesize children = _children;
are there in respective .h , .m files...
waht can problem....?
thanks in advance effort...
more info...
- (id)init { if (self = [super init]) { [self setisroot:no]; // [self setchildren:[nsmutablearray new]]; // <-- before, moved custom setter } return self; } - (id)initasroot { if (self = [self init]) { self.level = -1; self.index = -1; self.isexpaned = yes; self.value = @"root"; self.isroot = yes; } return self; }
Comments
Post a Comment