• 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
Object allocation problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Object allocation problem


  • Subject: Object allocation problem
  • From: Valerio Ferrucci <email@hidden>
  • Date: Fri, 17 Mar 2006 16:28:03 +0100

Hi,
perhaps I didn't understand very well the object allocation/ deallocation.
I want the poster from a movie to display in myApp.


BUT

If I uncomment the "[mov release]" line in the following code my App crashes.

Can someone explain me why?
How can I fix this?

- (NSImage*)getMoviePoster:(NSString*)moviePath
{
NSError *openError = nil;
QTMovie *mov = [QTMovie movieWithURL:[NSURL fileURLWithPath:moviePath] error:&openError];
NSImage *poster = [[mov posterImage] copy];


	// [mov release];

	return poster;
}

==================================================================
Valerio Ferrucci                        Tabasoft Sas
email@hidden                    http://www.tabasoft.it


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Object allocation problem
      • From: Prachi Gauriar <email@hidden>
    • Re: Object allocation problem
      • From: Paul Lynch <email@hidden>
  • Prev by Date: Re: NSImage get / set Pixels
  • Next by Date: Re: Object allocation problem
  • Previous by thread: AppleScript and sdef
  • Next by thread: Re: Object allocation problem
  • Index(es):
    • Date
    • Thread