All Questions
Tagged with automatic-ref-counting instruments
50 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 ...
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 ...
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:@"...
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 ...
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 ...
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] {
...
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 ...
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 ...
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: ...
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 ...
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 ...
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] ...
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 ...
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];
...
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 ...