简体   繁体   中英

Receive memory warning on console

My app crashes after showing Receive memory warning on console.

On surfing I found a solution to remove memory leaks but I am unable to remove memory leaks.

Here is screenshot showing leaks, with some percents.

在此处输入图片说明

How do I solve these leaks?

NOTE : I created this method in singleton class.

As this question is old and hope the user must get a solution.But i think to write answer for this to help other users in future. This scenario comes in these cases:-

1) you're using a lot of memory and available memory is low.

2) Not releasing data that are not in use.

you have to check these leaks:-

1)Use instruments to check memory leaks and where its leaking(Suggestion for them who got memory issues).

2)By seeing your code it seems to be memory leaks when you are allocating array in the singleton class.

3)Not releasing arrays.

Please checkout these links for better understanding of allocations. https://stackoverflow.com/a/3637159/1865424

https://stackoverflow.com/a/3898015/1865424

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM