[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: Flashplayer
From: "koos vriezen" <koos.vriezen () gmail ! com>
Date: 2007-10-20 10:53:05
Message-ID: d4e708d60710200353p1e5de45et9bc200a28f15c1ab () mail ! gmail ! com
[Download RAW message or body]
void ScriptExportEngine::unregister(const unsigned long objid)
+{
+ //See if this is an object identifier..
+ QMap<unsigned long, NPObject*>::iterator i = _objectsForId.find(objid);
+ if (i != _objectsForId.end()) {
+ NPObject* obj = *i;
+ //Is this the last reference?
+ if (obj->referenceCount == 1) {
+ _objectsForId.remove(objid);
+ _objectIds.remove(obj);
+ }
+
+ g_NPN_ReleaseObject(obj);
+ return;
+ }
Btw, this is a memory leak. Likely the NPObject has ref count > 0 as
it's an object inside the plugin, but since js counter part object is
deleted, you should always remove it from your object list.
Br,
Koos
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic