≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
SEHException was unhandled
Posted by:
(you are not logged in)
Enter the missing letter in: "Internation?l"
(you are not logged in)
Text:
[quote][b][/b] wrote: Is it possible that the SEHException would have happened if there were ISounds that didn't have their Dispose() called on them? I added this to my Update(): (soundEffects is a List of all of my playing ISounds) [code]for (int i = soundEffects.Count - 1; i >= 0; --i) { ISound iS = soundEffects[i]; if (iS != null && iS.Finished) { StopSound(iS); } else if (iS == null) { soundEffects.Remove(iS); } }[/code] And then here is StopSound [code]public static void StopSound(ISound sound) { if (sound != null) { sound.Stop(); soundEffects.Remove(sound); sound.Dispose(); sound = null; } }[/code] I ran the game all night without a single crash. This seems to have done the trick.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact