viezel / napp.alloy.adapter.restapi

RestAPI Sync Adapter for Titanium Alloy Framework
197 stars 102 forks source link

memory leak #27

Closed ajonno closed 10 years ago

ajonno commented 10 years ago

ive got a memory leak in a very simple test case Ti Alloy app.

Mads, send me an email to ajonno68@gmail.com and I'll provide you a link to a shared folder so you can just download the Ti Alloy app and run it.

  1. run the app
  2. open Instruments and attach to this app
  3. filter by TiUI objects
  4. open and close the modal window 5 or 6 times

if fetch() is run WITH a callback eg,. fetch({success: function...}) .. , and then the modal window is closed - NONE of the objects in the modal window are released from memory (button, window, listview). next time the modal window is opened, then the objects just keep piling up in memory, until the app crashes.

however if you comment out the callback (per above), then all objects are eventually release and memory is clean.

i'd initially passed this on to Appcelerator support, however they've sent me to you to seek a solution to what they say is a third party (this adaptor) memory leak issue.

perhaps this is something very simple that i am missing in my code, in terms of releasing backbone object(s). if so please do let me know.

otherwise let me also know what your test results look like and if you too can see a memory leak.

txs angus

aaronksaunders commented 10 years ago

@ajonno did you ever find out what was the cause of this issue?

ajonno commented 10 years ago

no i had to focus on other items so what i did was fall back to Ti.Network.createHTTPClient , which (obviously) sorted the memory leak. i do plan to come back to this but not a priority right now. have u had same issue ?

cheers, Angus

On Friday, 28 February 2014 at 3:38 am, aaronksaunders wrote:

@ajonno (https://github.com/ajonno) did you ever find out what was the cause of this issue?

— Reply to this email directly or view it on GitHub (https://github.com/viezel/napp.alloy.adapter.restapi/issues/27#issuecomment-36261594).