SFML community forums
Help => Audio => Topic started by: netrick on February 14, 2013, 09:20:23 pm
-
What happens if a sf::Sound or sf::Music instace is destroyed while it's playing?
Will it silently stop playing or it will be a crash?
-
I wonder why you would even want to know this. ;D
The question you should rather ask is: What ugly thing am I doing, that there could ever be the possibility of sf::Sound or sf::Music getting destroyed while playing? ;)
IIRC it will just stop playing. Besides that, it would've been soooo much easier to just simple test it, rather than opening a forum thread and waiting for an answer. ;)
-
What happens if a sf::Sound or sf::Music instace is destroyed while it's playing?
A clean and well defined thing, and hopefully what you would expect: the sound/music stops. A library that crashes in this situation would be very badly designed and/or written.