NSSound retain usage
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.