• 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
Re: Why is this code leaking memory?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is this code leaking memory?


  • Subject: Re: Why is this code leaking memory?
  • From: Jan Van Boghout <email@hidden>
  • Date: Thu, 19 Dec 2002 21:14:29 +0100

On jeudi, dicembre 19, 2002, at 08:31 PM, Jan Van Boghout wrote:

Hello everybody,

I have two lines that load an imageRep of an image on the HD, and
they're leaking memory like hell. Any ideas why this is happening? It
shouldn't, that's the problem.

Code:

imageRep = [NSBitmapImageRep imageRepWithData:[NSData
dataWithContentsOfFile:@"/Library/Desktop Pictures/Aqua Blue.jpg"]];

[imageRep release];

Why are you calling release on an autorelease object?

Because I was trying everything to fix the leak, but it obviously didn't work.
_______________________________________________
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.
References: 
 >Re: Why is this code leaking memory? (From: email@hidden)

  • Prev by Date: Re: Why is this code leaking memory?
  • Next by Date: Antw.: Why is this code leaking memory?
  • Previous by thread: Re: Why is this code leaking memory?
  • Next by thread: Re: Why is this code leaking memory?
  • Index(es):
    • Date
    • Thread