We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1003 - FLAC_close does not properly close SDL_RWops structure.
Summary: FLAC_close does not properly close SDL_RWops structure.
Status: RESOLVED INVALID
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-15 15:38 UTC by tigerfishdaisy
Modified: 2011-12-31 15:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tigerfishdaisy 2010-05-15 15:38:24 UTC
When a FLAC File is opened using Mix_LoadMUS_RW( ... ), the corresponding music close call does not free the rwops structure.
Comment 1 Sam Lantinga 2011-02-17 13:30:08 UTC
The API doesn't have a 'freesrc' parameter which is usually used to indicate whether you manage the memory or you expect SDL_mixer to own it.  Right now it always assumes that you manage it, which results in memory leaks in the file-based interface.
Comment 2 Sam Lantinga 2011-12-31 15:38:09 UTC
This isn't technically a bug, as I mentioned above.  The API assumes that you manage the life cycle of the rwops structure and close it after Mix_FreeMusic().

There was a memory leak when using the file interface, which has been fixed:
http://hg.libsdl.org/SDL_mixer/rev/565549e046b0

Thanks!