{"id":3933,"date":"2014-03-30T06:25:53","date_gmt":"2014-03-30T06:25:53","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/runtime-error-__nsautoreleasenopool-autoreleased-with-no-pool-in-place-just-leaking-collection-of-common-programming-errors\/"},"modified":"2014-03-30T06:25:53","modified_gmt":"2014-03-30T06:25:53","slug":"runtime-error-__nsautoreleasenopool-autoreleased-with-no-pool-in-place-just-leaking-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/runtime-error-__nsautoreleasenopool-autoreleased-with-no-pool-in-place-just-leaking-collection-of-common-programming-errors\/","title":{"rendered":"Runtime error: __NSAutoreleaseNoPool(): &hellip;autoreleased with no pool in place &#8211; just leaking-Collection of common programming errors"},"content":{"rendered":"<p>I am getting a list of errors like the following error when I compile my project for iOS.<\/p>\n<pre><code>2011-08-25 12:32:44.016 rtsp[55457:6003]\n    *** __NSAutoreleaseNoPool(): Object 0x64095a0 of class __NSArrayM\n    autoreleased with no pool in place - just leaking \n<\/code><\/pre>\n<p>It appears because of the following function<\/p>\n<pre><code>- (void) start {   \n    \/\/Existing code\n    session = [[RTSPClientSession alloc] initWithURL:\n        [NSURL URLWithString:\n         @\"rtsp:\/\/video3.americafree.tv\/AFTVComedyH2641000.sdp\"]];\n    [session setup];\n    NSLog(@\"getSDP: --&gt; %@\",[ session getSDP ]);\n    NSArray *array =  [session getSubsessions];\n\n    for (int i=0; i &lt; [array count]; i++) {\n        RTSPSubsession *subsession = [array objectAtIndex:i];       \n        [session setupSubsession:subsession clientPortNum:0 ];\n        subsession.delegate=self;\n        [subsession increaseReceiveBufferTo:2000000];\n        NSLog(@\"%@\", [subsession getProtocolName]);\n        NSLog(@\"%@\", [subsession getCodecName]);\n        NSLog(@\"%@\", [subsession getMediumName]);\n        NSLog(@\"%d\", [subsession getSDP_VideoHeight]);\n        NSLog(@\"%d\", [subsession getServerPortNum]);\n    }\n    [session play];\n    NSLog(@\"error: --&gt; %@\",[session getLastErrorString]);\n    [session runEventLoop:rawsdp];\n}\n<\/code><\/pre>\n<p>When I add and <code>NSAutoreleasePool<\/code> to my function<\/p>\n<pre><code>- (void) start {\n    NSAutoReleasePool *pool=[[NSAutoReleasePool alloc] init];\n    session = [[RTSPClientSession alloc] initWithURL:[NSURL ...\n    ...\n    [pool drain];\n}\n<\/code><\/pre>\n<p>The error is gone but I don&#8217;t get any output from my function. Is adding <code>NSAutoreleasePool<\/code> the right solution?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am getting a list of errors like the following error when I compile my project for iOS. 2011-08-25 12:32:44.016 rtsp[55457:6003] *** __NSAutoreleaseNoPool(): Object 0x64095a0 of class __NSArrayM autoreleased with no pool in place &#8211; just leaking It appears because of the following function &#8211; (void) start { \/\/Existing code session = [[RTSPClientSession alloc] initWithURL: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3933","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3933"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3933\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}