In a doc-based ARC-enabled application I have a WebView that is opening an HTML file. The idea is to do some editing, and then save to WebArchive. When I run Instruments I find random leaks as in the image below. I am not initializing anything with malloc
, why am I getting them? (I get the leaks when I start opening and closing windows.)
Document.h
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
@interface KBDocument : NSPersistentDocument {
IBOutlet WebView *webView;
}
Document.m
- (void)windowControllerDidLoadNib:(NSWindowController *)aController
{
[super windowControllerDidLoadNib:aController];
NSString *urlStr = @"file:///Users/.........../Content/1/index.html";
NSURL *url = [NSURL URLWithString:urlStr];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[[webView mainFrame] loadRequest:requestObj];
[webView setEditable:YES];
}
Leaks: