loadConfig memleak

Post here all your questions related with the SmartFoxServer iPhone API

Moderators: Lapo, Bax

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

loadConfig memleak

Post by roocell »

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];
cemuzunlar
Posts: 47
Joined: 26 Dec 2008, 00:45
Contact:

Post by cemuzunlar »

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

Post by cBroadbo »

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

Post by skrekkur »

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: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply