|
Is it possible that there will still be leaks when running my app on an iPhone even if the simulator has absolutely none??
Started by Steve on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It is possible that some memory leaks to be present when tested on a real for memory leaks in the device....
If you run your app through Instruments, and there don't appear to be any memory leaks, you're with testing, you should be fine.
|
|
Hi all,
I'm working on tracking down some difficult to find memory leaks in my iPhone program. I'm running a quick test on an app which leaks an NSString object with the following intentionally -incorrect- code:
-(void)applicationDidFinishLaunching:(NSNotification...
Started by Steve on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Remember, that code runs in your process; moreover, leaksFor this example, leaks reports....
I think the reason you are seeing this in leaks input manager hacks before leak-hunting.
Crawl and see what piece of code caused the leak.
|
|
I am using GetModuleHandle in my function. That function gets called every time I do an operation. I want to know if that function gets called again and again, will the GetModuleHandle cause any handle leaking (stack overflow or memory leaks or anything...
Started by rajat on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You....
This doesn't cause any memory leakage.
My recollection is that, if you inspect the value, generally it is the same handle returned each time in your process (it may be different in a different process) .
You can call GetModuleHandle() all you want.
|
Ask your Facebook Friends
|
I don't understand the output from the "Leaks" performance tool in XCode. How can I interpret this output?
Started by MrDatabase on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The Leaks Instrument looks for blocks of memory that are not referenced from the application code it's not simple to use, there are many leaks apparently from the OS and/or the system libraries, the details often show over-freed blocks (....
|
|
Hi,
I am trying to locate leaks using instruments, but the leaks I see there are like the ones in the next picture:
leaks
As you can see there's no information of which line of code is exactly leaking. All leaks I have, around 20, are like this, or in...
Started by Mike on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Dont know what you confused about?
The thing that Leaks shows you is, the trace should have been released....
Some toss off code of mine leaks in main.m in your case.
The lines in the code where the leak occurs along with the call stack.
|
|
In order for an application to have no memory leaks, does the number of new in a C++ project match the number of delete?
Started by joemoe on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
Unfortunately it is in general a highly non-trivial problem to verify the... .
If you are up to finding a preliminary way to detect memory leaks Purify to test for memory leaks n C++ programs.
For each new executed <=> no leak.
|
|
I'm running a debug build on the iPhone with Leaks. I'd like to break at certain points to see if particular leaks have occurred yet. This would allow me to narrow down where the leak is occurring by process of elimination. However, the debugger is ignored...
Started by 4thSpace on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can attach Leaks ....
Run in debug mode as usual, then run Leaks separately.
If you launch it in debug mode first (cmd-Y), you can then open Instruments and choose the Leaks template and attach to your running iPhone app process.
|
|
How do you fix a memory leak where you're returning from the function the leak itself?
For example, I make a char* returnMe = new char[24324]; returnMe is what ends up getting returned from the function. How do you account for this memory leak? How do...
Started by Mark on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Better, there's a leak if the client code on purpose calls your routine and does not do(); /* do something with buf *....
It is not a memory leak, there's no leak.
You can still delete[] the pointer returnMe even after it is returned .
|
|
I'm running leaks through Instruments on my iPhone app and I'm seeing a lot of leaks that don't appear to be coming from my code.
For example:
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:operation]; operation...
Started by Brian on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Else?
If you think about it, Leaks would assume delegate is a leak if you have no other referencesIt's entirely possible that Apple's frameworks have leaks in them (however unlikely it may seem project), then test that with Instruments....
|
|
Hi,
I'm checking for leaks in Instruments, and I've set to check every second, but no leaks are appearing.
I'm sure there must be some in my app, is there anything which could stop these from appearing? Is there a good way I can create a leak so that ...
Started by mac_55 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You're only going to find leaks with a tool ....
Creating a leak is easy:
id someObject = [[NSObject alloc] init]; someObject = nil;
Drop some code like that into your app, and you should definitely see a leak show up in Instruments.
|