On profiling an app with the following code, running on iOS 4.3 simulator with PLWeakCompatibility, I am getting a leak in the Leaks instrument, saying that the struct TLS (as well as the dictionaries inside it) created in GetTLS are leaked.
Is this a bug with PLWeakCompatibility, or am I doing something wrong?
- (void)foo {
@autoreleasepool {
NSThread* __weak myThread = [NSThread currentThread];
[myThread self];
}
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[NSThread detachNewThreadSelector:@selector(foo) toTarget:self withObject:nil];
return YES;
}
On profiling an app with the following code, running on iOS 4.3 simulator with PLWeakCompatibility, I am getting a leak in the Leaks instrument, saying that the struct TLS (as well as the dictionaries inside it) created in GetTLS are leaked.
Is this a bug with PLWeakCompatibility, or am I doing something wrong?