<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>cocos2d for iPhone &#187; Topic: release issues</title>
		<link>http://www.cocos2d-iphone.org/forum/topic/2739</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 02:02:41 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cocos2d-iphone.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.cocos2d-iphone.org/forum/rss/topic/2739" rel="self" type="application/rss+xml" />

		<item>
			<title>Lam on "release issues"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/2739#post-17035</link>
			<pubDate>Sat, 31 Oct 2009 17:18:59 +0000</pubDate>
			<dc:creator>Lam</dc:creator>
			<guid isPermaLink="false">17035@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>There we go logical error... It's good that you fixed it.
</p></description>
		</item>
		<item>
			<title>dmaz on "release issues"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/2739#post-17034</link>
			<pubDate>Sat, 31 Oct 2009 17:17:45 +0000</pubDate>
			<dc:creator>dmaz</dc:creator>
			<guid isPermaLink="false">17034@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>fixed... I had sprite as a property with (readwrite,retain), stupid me.... I even looked right at it a couple of times last night and it didn't even  register until this morning... I guess that's what sleep can do for you!
</p></description>
		</item>
		<item>
			<title>dmaz on "release issues"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/2739#post-17008</link>
			<pubDate>Sat, 31 Oct 2009 04:54:21 +0000</pubDate>
			<dc:creator>dmaz</dc:creator>
			<guid isPermaLink="false">17008@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I wondered about that... my code does assume that parent is ccAtlasSpriteManager...  but the removal does stop it from displaying so that must be right.... right? </p>
<p>I tried checking the retain counts but they seemed all whack.  I read somewhere that you shouldn't count on those because there's a lot of things you don't expect that happens with NSObjects during their life.</p>
<p>I'm going to see about confirming that parent... [edit] confirmed, they are the same parent obj...
</p></description>
		</item>
		<item>
			<title>dmaz on "release issues"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/2739#post-17007</link>
			<pubDate>Sat, 31 Oct 2009 04:48:58 +0000</pubDate>
			<dc:creator>dmaz</dc:creator>
			<guid isPermaLink="false">17007@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>ok, that makes me feel better...  the only other code is stuff just moving the sprite around and some actions.  those all dealloc as they are supposed to with the call to removeChild.  In the code above, sprite is a weak reference but that's really it.  I'm pretty sure that if I keep the release in there I will eventually start getting errors because of over release...  </p>
<p>my project is still running under the 8.2 beta... maybe there was a leak.   is there any easy way to update the cocos framework in an existing project?
</p></description>
		</item>
		<item>
			<title>shaunti on "release issues"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/2739#post-17003</link>
			<pubDate>Sat, 31 Oct 2009 04:12:23 +0000</pubDate>
			<dc:creator>shaunti</dc:creator>
			<guid isPermaLink="false">17003@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Perhaps since you are calling the removal from itself.parent?</p>
<p>You can always nslog out the current retainCount before calling this to see for sure.
</p></description>
		</item>
		<item>
			<title>Lam on "release issues"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/2739#post-16999</link>
			<pubDate>Sat, 31 Oct 2009 03:53:46 +0000</pubDate>
			<dc:creator>Lam</dc:creator>
			<guid isPermaLink="false">16999@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Your thinking is correct. Is the sprite never being deallocated at a really later time?</p>
<p>It could be some logical error you made before or there is a bug in cocos. The snippet of code is too little to really verify anything though.
</p></description>
		</item>
		<item>
			<title>dmaz on "release issues"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/2739#post-16992</link>
			<pubDate>Sat, 31 Oct 2009 01:34:17 +0000</pubDate>
			<dc:creator>dmaz</dc:creator>
			<guid isPermaLink="false">16992@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I'm a bit confused...  if I do:<br />
<pre><code>AtlasSprite * sprite = [AtlasSprite spriteWithRect:allFrames[index].rect spriteManager:ccAtlasSpriteManager];
[ccAtlasSpriteManager addChild:sprite];</code></pre>
<p>I then think the sprite should be dealloc'd after this:<br />
<code>[sprite.parent removeChild:e.sprite cleanup:YES];</code></p>
<p>My thinking for that is because addChild retains the obj so shouldn't removeChild release?  Now, the removeChild does remove it from being drawn but I have to do a <code>[sprite release]</code> to actually get it to dealloc.  If I only do that and not the release then the object  continues to be displayed.</p>
<p>I expect to not have to release since I'm using an AtlasSprite convenience constructor.  what am I doing wrong here?
</p></description>
		</item>

	</channel>
</rss>

