[Webkit-unassigned] [Bug 11523] New: WebBaseNetscapePluginView leaks like a mofo
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Nov 5 18:08:38 PST 2006
http://bugs.webkit.org/show_bug.cgi?id=11523
Summary: WebBaseNetscapePluginView leaks like a mofo
Product: WebKit
Version: 420+ (nightly)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: UNCONFIRMED
Severity: Blocker
Priority: P1
Component: Plug-ins
AssignedTo: webkit-unassigned at opendarwin.org
ReportedBy: steve at cocoatech.com
In my app, an interactive flash swf is constantly sending info back and forth
to the client app and each communication creates a stream but never releases
it. It was eating memory like crazy.
Add this to WebBaseNetscapePluginView.m
- (void)streamIsDead:(WebBaseNetscapePluginStream*)stream;
{
[[stream retain] autorelease];
// don't want to retain the stream anylonger
[streams removeObjectIdenticalTo:stream];
}
In WebBaseNetscaplePluginStream.m add this one line to setPluginPointer....
- (void)setPluginPointer:(NPP)pluginPointer
{
if (pluginPointer) {
instance = pluginPointer;
pluginView = [(WebBaseNetscapePluginView *)instance->ndata retain];
WebNetscapePluginPackage *plugin = [pluginView plugin];
NPP_NewStream = [plugin NPP_NewStream];
NPP_WriteReady = [plugin NPP_WriteReady];
NPP_Write = [plugin NPP_Write];
NPP_StreamAsFile = [plugin NPP_StreamAsFile];
NPP_DestroyStream = [plugin NPP_DestroyStream];
NPP_URLNotify = [plugin NPP_URLNotify];
} else {
instance = NULL;
[pluginView streamIsDead:self]; // <-- added this line only
[pluginView release];
pluginView = nil;
NPP_NewStream = NULL;
NPP_WriteReady = NULL;
NPP_Write = NULL;
NPP_StreamAsFile = NULL;
NPP_DestroyStream = NULL;
NPP_URLNotify = NULL;
}
}
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list