fix memleak of SDL_Surface objects
ee35f6ac9a
added a `surface& operator=(SDL_Surface* surf)` function that wrongly increased the refcounter of the passed surface so that it'd be leaked later.
No we go back to the old behaviour where `surface& operator=(SDL_Surface* surf)` is handled by creating a temporary surface object that is calls then `surface& operator=(surface&& s)`
This commit is contained in:
parent
8cffcb930f
commit
15c070b865
1 changed files with 0 additions and 6 deletions
|
@ -54,12 +54,6 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
surface& operator=(SDL_Surface* surf)
|
||||
{
|
||||
assign_surface_internal(surf);
|
||||
return *this;
|
||||
}
|
||||
|
||||
surface& operator=(surface&& s) noexcept
|
||||
{
|
||||
free_surface();
|
||||
|
|
Loading…
Add table
Reference in a new issue