Archived

This topic is now archived and is closed to further replies.

Releasing Sound Buffers

This topic is 5618 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m fully aware that if you release a DirectSound buffer after the DirectSound COM object it was created off of has been released run-time errors will occur. Does this mean then that when releasing the DirectSound COM object itself, all the sound buffers that were created off of it are also released along with it.

Share this post


Link to post
Share on other sites
What would be the implications then of not releasing my sound buffers. Obviously I want to release them but making sure that I don''t terminate the DS COM object before all buffers are released, could be a bit of bitch to manage.

Share this post


Link to post
Share on other sites
If you do not release the buffers then the memory will not be freed. This will result in memory leaks.

Using something like a linked list of pointers can be helpful for managing the soundbuffers. This way you can guarantee you catch all the buffers.

Cheers,
John

Share this post


Link to post
Share on other sites