loadConfig memleak

Post here all your questions related with the SmartFoxServer iPhone API

Moderators: Lapo, Bax

roocell
Posts: 29
Joined: 10 Jun 2009, 20:12

loadConfig memleak

Postby roocell » 16 Sep 2009, 22:26

found this is leaking some memory
need to release NSURL* url;

added the release after it was used. this seems to stop the leak.

Code: Select all

doc = [[CXMLDocument alloc] initWithContentsOfURL:url options:0 error:&error];
[url release];
User avatar
cemuzunlar
Posts: 47
Joined: 26 Dec 2008, 00:45
Contact:

Postby cemuzunlar » 22 Sep 2009, 15:48

Thanks. We'll include this fix to the next release.
Cem Uzunlar
Infosfer Game and Visualization Technologies
http://www.infosfer.com
contact@infosfer.com
cBroadbo
Posts: 20
Joined: 16 Apr 2009, 17:49

CLANG found this too for me.....and a few other things

Postby cBroadbo » 06 Jan 2010, 19:21

While you are fixing this for the next release, I would suggest running CLANG (Build/Build & Analyze) in the latest version of xCode. It found this leak and a handful of variables possibly being used without being initialized.
skrekkur
Posts: 5
Joined: 30 Sep 2009, 15:38
Location: Reykjavik, Iceland

Re: CLANG found this too for me.....and a few other things

Postby skrekkur » 08 Feb 2010, 13:12

cBroadbo wrote:While you are fixing this for the next release, I would suggest running CLANG (Build/Build & Analyze) in the latest version of xCode. It found this leak and a handful of variables possibly being used without being initialized.


I must agree with this. Clang exposes some potentially dangerous code paths.
It would also be nice to have the API completely warning free.
Or at least leave comments where warnings are generated if there is some valid explanation for them. Currently at least NSObjectAddition generates two warnings (one for each function).
User avatar
Lapo
Site Admin
Posts: 20099
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 11 Mar 2010, 16:56

New release here:
viewtopic.php?t=6994
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “iPhone Objective-C API”

Who is online

Users browsing this forum: No registered users and 1 guest