언어 설정

Menu
Sites
Language
Using an iframe has a memory leak.

Hi, 

I'm using iframe to load a html5 game in Tizen Web Project.

It's working well to load a local game in iframe at fist time. 

But if i try to change src of the iframe several times, the free memory became reduced.

and the free memory does not recharged. If i try it a few times that the app is suddenly terminated.

How can i resolve this issue? Please help me.

 

 

Edited by: Kei Goh on 03 4월, 2015

Responses

4 댓글
AVSukhov

Hello,

May be this articles helps you:

http://stackoverflow.com/questions/18644462/avoiding-memory-leaks-loading-content-into-an-iframe

http://stackoverflow.com/questions/8407946/is-it-possible-to-use-iframes-in-ie-without-memory-leaks

Kei Goh

Thank you for your answer.

I already tried to test them. but it's not working.

Android's Hybrid app can open/close new activity and remove webview in native code. so it can solve the memory leak.

but i don't know How can i do that with Tizen.

External browser of Tizen can not use file protocol(file:///) to draw images in canvas with HTML5. so i cant use the "launchAppControl" also.

I hope i can resolve this problem soon.

 

 

 

 

AVSukhov
Hello,

Do you try to create "iframe" element dynamicly?

Delete "iframe" before change "src" and recreate again.

 

Kei Goh

Yes, I tried to delete iframe element before change 'src'.

but the free memory does not restore.

Actually i have tested all the way that i find on the Internet. but i have not found a solution yet.

And  i tested a HTML5 game without iframe.

Test : main page -> game play -> back -> game play (direct location with href)

That way had same result with free memory. and funny thing is that the game size is 2MB. but free memory reduced about 25MB.

if i test that 4 times, the web app is down..