summaryrefslogtreecommitdiff
path: root/src/resources/sdlmusic.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-15 01:12:30 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-15 01:12:30 +0300
commit54d665ca2ff9244ef4b5a6dc48424d4a3364a40c (patch)
tree5e2a0d0acad140d0842d4ee169131049fd5b1af7 /src/resources/sdlmusic.h
parent4206ffda4d2acd238c8f0093345af0431cf8a863 (diff)
downloadplus-54d665ca2ff9244ef4b5a6dc48424d4a3364a40c.tar.gz
plus-54d665ca2ff9244ef4b5a6dc48424d4a3364a40c.tar.bz2
plus-54d665ca2ff9244ef4b5a6dc48424d4a3364a40c.tar.xz
plus-54d665ca2ff9244ef4b5a6dc48424d4a3364a40c.zip
fix music RWops memory leak.
Diffstat (limited to 'src/resources/sdlmusic.h')
-rw-r--r--src/resources/sdlmusic.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/resources/sdlmusic.h b/src/resources/sdlmusic.h
index 05a5528b7..23397ec61 100644
--- a/src/resources/sdlmusic.h
+++ b/src/resources/sdlmusic.h
@@ -29,6 +29,8 @@
#include "localconsts.h"
+//struct SDL_RWops;
+
/**
* Defines a class for loading and storing music.
*/
@@ -37,7 +39,8 @@ class SDLMusic final : public Resource
public:
SDLMusic() :
Resource(),
- mMusic(nullptr)
+ mMusic(nullptr),
+ mRw(nullptr)
{ }
A_DELETE_COPY(SDLMusic)
@@ -73,9 +76,10 @@ class SDLMusic final : public Resource
/**
* Constructor.
*/
- explicit SDLMusic(Mix_Music *const music);
+ explicit SDLMusic(Mix_Music *const music, SDL_RWops *const rw);
Mix_Music *mMusic;
+ SDL_RWops *mRw;
};
#endif // RESOURCES_SDLMUSIC_H