microsoft / ace

Build Cordova apps with true native UI
http://microsoft.github.io/ace
Other
850 stars 157 forks source link

Memory deallocation #51

Open efistokl opened 8 years ago

efistokl commented 8 years ago

Hello @adnathan, I believe your plugin is good at native objects manipulation (That is the reason I'm using it). So, I'm curious if there is a way to say that some native object is not needed and can be garbage collected.

My situation (iOS): I instancinate a Popup object, add AceWebView as his child, then I place a Popup object somewhere with show method on Popup object. When the user is done, he/she clicks 'close' button, then I invoke hide method on Popup object.

So that, if user does all this stuff several times (over 15 times), I have too many allocated WebViews. Then my app is killed... Likely, the link to AceWebView is stored somewhere in plugin, thus, Automatic reference counting mechanism can't deallocate memory for these unused WebViews

I'd be glad if there is a way to solve my problem.

Thank You in advance!

(I solved similar problem in Android by invoking some android.webkit.WebView methods to destroy its internal state and stuff like that)