• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Threads again: NSData not disposed (using conv. method)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Threads again: NSData not disposed (using conv. method)


  • Subject: Threads again: NSData not disposed (using conv. method)
  • From: Stefan Pantke <email@hidden>
  • Date: Mon, 9 Feb 2004 20:51:45 +0100

I asked some days ago a question regarding a multithreaded application.
I received a good answer pointing me to AppKit threading problems.

Well, the application still does not work fine.

I disabled any thread worker processing and the enabled it again. The workers
work quite fine - and do not consume memory, if all real work is disabled.

As soon as I perform

downloadedData = [NSData dataWithContentsOfURL:urlForDownload];

all workers mutate to memory consumers - the node count reported from leaks
jumps from 20000 to 88000.

Since URLWithString is a convenience method, it should autorelease it's memory.

Thus, it SHOULD be released, since the worker's main loop releases it's local
AutoreleasePool at the end of the loop, which has been allocated at the beginning
of the loop.

The downloadedData is not used by any other part of code, not is it used for
diplay purposes, e.g.

Which point do I miss?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Threads again: NSData leaking (using dataWithContentsOfURL)
      • From: Stefan Pantke <email@hidden>
  • Prev by Date: Re: catching uncaught exceptions
  • Next by Date: Re: Tabs window autoresizing.
  • Previous by thread: Re: catching uncaught exceptions
  • Next by thread: Re: Threads again: NSData leaking (using dataWithContentsOfURL)
  • Index(es):
    • Date
    • Thread