Skip to main content

All Questions

5 votes
1 answer
2k views

Memory leak, despite no strong references?

I'm doing a performance test to try to measure the rendering performance of an important NSOutlineView in my Mac app. In the process, I'm looping several times, creating the view, embedding it in a ...
Alexander's user avatar
  • 62.9k
0 votes
0 answers
52 views

Memory leak for NSOperationQueue observer?

My app is randomly crashing as I have used KVO for NSOperationQueue. I did run instrument and found below ARC retain count situation. and this is my code. @try { [[ApplicationManager ...
Pankaj Gaikar's user avatar
0 votes
1 answer
99 views

iOS ARC UIAlertView leaking memory

I have simple method showing AlertView with textfield. Instruments showing memory leak in this. Please explain. - (void)method { NSString *value = [[NSUserDefaults standardUserDefaults] valueForKey:@"...
PK86's user avatar
  • 1,198
2 votes
0 answers
689 views

How to programmatically purge/clean cocoa application memory?

I'm working on a Mac app. Initially monitoring Xcode's memory report while I ran my app showed showed the memory was just ramping up crazy. I used Instruments and profiled my app for allocations and ...
mfaani's user avatar
  • 36.1k
9 votes
2 answers
4k views

Using instruments to find memory leaks

I've tried to read almost every decent tutorial in the internet, but still can't understand what is really happening here: I've "Hide System Libraries" and "Invert the call tree", but I do not ...
JuicyFruit's user avatar
  • 2,668
3 votes
1 answer
118 views

Memory leak in swift while invoking description method of an instance

Memory leak happens when I call description on the instance logg public func writeLog(logs:AnyObject!...) { for i:Int in 0 ..< logs.count { if let logg = logs[i] { ...
Durai Amuthan.H's user avatar
1 vote
0 answers
73 views

Allocations Generation keeps growing

I ran the Allocations Instrument for my app to check the memory growth as the app was crashing because of low memory after running for a few days. It's an app running on Guided Access mode which is on ...
Jigglypuff's user avatar
1 vote
1 answer
177 views

Dealing with strong reference cycles in Xcode 6.4

Recently, I’ve received a quite large and ugly legacy code written in Swift 1.2 with full of singletones and managers referencing to each other. One of my task is to clean this up and get to the point ...
joe.kovalski's user avatar
2 votes
1 answer
365 views

Reference Counting with Instruments

I put the code below in applicationDidFinishLaunching:, and launched the app via Instruments, in conjunction with the Allocations tool. func applicationDidFinishLaunching(aNotification: ...
Paul Patterson's user avatar
0 votes
0 answers
31 views

dealloc not being called in hierachy of view controllers despite looks ok in Allocation Instrument

I have UIViewControllers A, B, C, and D where C's dealloc sometimes is not called for reasons I do not yet understand. This path will call C.dealloc: A presents B, B pushes C, C unwinds to A This ...
Drux's user avatar
  • 12.6k
9 votes
1 answer
368 views

Instruments and heap growth, when is growth really a leak?

I'm using instruments on a device to try to figure out if I have any memory leaking or abandoned. Specifically I am using leaks and allocations. While instruments doesn't point out any leaks, that ...
dragonflyesque's user avatar
1 vote
2 answers
2k views

UIImage memory leak issue in ARC

We used below code to set image in image view, @autoreleasepool { UIImageView *titleView = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] ...
MobDevUser's user avatar
1 vote
3 answers
121 views

What can cause different ObjC/ARC memory behaviour between Release and Debug configuration?

I was running a test to make sure objects are being deallocated properly by wrapping the relevant code section in a 10 second long while loop. I ran the test in Debug and Release configurations with ...
lmirosevic's user avatar
  • 16.3k
1 vote
1 answer
264 views

CGImage causing memory leak

I am creating a cgimage using this code: UIGraphicsBeginImageContext(CGSizeMake(size*2, size*2)); CGContextRef ctx = UIGraphicsGetCurrentContext(); [[SKColor colorWithWhite:0.8 alpha:1] setFill]; ...
Max Hudson's user avatar
  • 10.2k
0 votes
0 answers
447 views

Debugging a large memory leak in Instruments

I'm currently investigating what appears to be a large memory leak in my application. Using Instruments' Allocations template and the mark generation feature I can see that after a UIViewController ...
Camsoft's user avatar
  • 12k

15 30 50 per page