I need to use some 75 (small) .wav files in my Winforms C# application and was wondering which system is more efficient (memory wise) - loading a .wav from a file and playing the sound or using embedded resources?
If I use the file method, I take it the memory would be freed-up after the sound has been played. If I use resources I believe these would not be freed-up until...
An embedded resource is still just part of your compiled assembly file, and it is not loaded into memory when the assembly is loaded, it is loaded as required. So there's no real difference memory-wise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With