forked from OSchip/llvm-project
retain/release checker: don't track NSPanel until we have better reasoning about
the subtle ownership issues of such objects. llvm-svn: 68397
This commit is contained in:
parent
99c54d7fb0
commit
751e7e3833
|
@ -1184,8 +1184,10 @@ void RetainSummaryManager::InitializeMethodSummaries() {
|
|||
// Thus, we need to track an NSWindow's display status.
|
||||
// This is tracked in <rdar://problem/6062711>.
|
||||
// See also http://llvm.org/bugs/show_bug.cgi?id=3714.
|
||||
addClassMethSummary("NSWindow", "alloc",
|
||||
getPersistentSummary(RetEffect::MakeNoRet()));
|
||||
RetainSummary *NoTrackYet = getPersistentSummary(RetEffect::MakeNoRet());
|
||||
|
||||
addClassMethSummary("NSWindow", "alloc", NoTrackYet);
|
||||
|
||||
|
||||
#if 0
|
||||
RetainSummary *NSWindowSumm =
|
||||
|
@ -1200,6 +1202,10 @@ void RetainSummaryManager::InitializeMethodSummaries() {
|
|||
|
||||
// For NSPanel (which subclasses NSWindow), allocated objects are not
|
||||
// self-owned.
|
||||
// FIXME: For now we don't track NSPanels. object for the same reason
|
||||
// as for NSWindow objects.
|
||||
addClassMethSummary("NSPanel", "alloc", NoTrackYet);
|
||||
|
||||
addInstMethSummary("NSPanel", InitSumm, "initWithContentRect",
|
||||
"styleMask", "backing", "defer", NULL);
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ extern NSString *NSWindowDidBecomeKeyNotification;
|
|||
}
|
||||
- (void)myMethod2
|
||||
{
|
||||
NSPanel *panel = [[NSPanel alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:(BOOL)1]; // expected-warning{{leak}}
|
||||
NSPanel *panel = [[NSPanel alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:(BOOL)1]; // no-warning
|
||||
|
||||
[panels addObject:panel];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue