• 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
NSSound retain usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSound retain usage


  • Subject: NSSound retain usage
  • From: Chris Silverberg <email@hidden>
  • Date: Mon, 16 Jun 2003 10:45:48 -0700
  • Organization: Silverberg.Net

Hi folks,

A question regarding NSSound. When I use the 'play' method, will that cause
the sound to retain itself for the duration of the play?

The reason I ask is that I'd like to be able to play a sound by simply
calling this:

[[NSSound soundNamed:@"wizbang"] play];

However, I could see this as being problematic. The sound is set to
auto-release because I'm using the soundNamed class method. So if the sound
is still playing, what happens when the sound is released? But if 'play'
causes the sound to retain itself, then I dont have to worry about it as it
would likely release itself after the sound completes(?)

As a side point, I'm also curious about this issue in relation to timers.
If I create a timer and schedule it, do I need to retain it just so I can
release it later? Or is there a good way to create timers that will release
themselves after they have been invalidated?

thanks,
Chris
_______________________________________________
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.

  • Prev by Date: NSTableView ignoring arrow keys (solved)
  • Next by Date: Re: Registering File Types or Icons
  • Previous by thread: Re: NSTableView ignoring arrow keys (solved)
  • Next by thread: Creating an in-memory file? (for zlib's gzwrite)
  • Index(es):
    • Date
    • Thread