Fixed memory leak in sf::Font (reference counter was never initialized)
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1342 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
327cfe4ec6
commit
b2b0cb2144
@ -76,6 +76,7 @@ bool Font::LoadFromFile(const std::string& filename)
|
||||
{
|
||||
// Cleanup the previous resources
|
||||
Cleanup();
|
||||
myRefCount = new int(1);
|
||||
|
||||
// Initialize FreeType
|
||||
// Note: we initialize FreeType for every font instance in order to avoid having a single
|
||||
@ -115,6 +116,7 @@ bool Font::LoadFromMemory(const char* data, std::size_t sizeInBytes)
|
||||
{
|
||||
// Cleanup the previous resources
|
||||
Cleanup();
|
||||
myRefCount = new int(1);
|
||||
|
||||
// Initialize FreeType
|
||||
// Note: we initialize FreeType for every font instance in order to avoid having a single
|
||||
|
Loading…
Reference in New Issue
Block a user