jeudi 1 janvier 2015

Memory issue in db-access IOS ORM on commit and Fetch

i am using db-access ORM in my one iOS project. I am facing memory issue while using it in my project my app scenario is, I need to download data from server to the local db in pages form in background threads in my app.


Steps I am doing is fetch a page of 30 records from server, Then in loop check the record exist in db by using firstMatchOf:@"product_uuid" withValue:productUuid

method. Then if it does not return then create object and commit using following chunk of code productObj = [Products new]; productObj.product_name=name; productObj.product_uuid=productUuid; BOOL success=[productObj commit];


there are many records, and I can see in profiler that fetch function and commit function retaining too much memory and does not release the memory. So for instance I downloaded 40 pages of 30 records the app memory usage become 100MB and it is increasing with increasing of records. Can you please help my in memory management issue or if I am doing anything wrong please assist me.


You help will be highly appreciated.




Aucun commentaire:

Enregistrer un commentaire