Skip to content

Commit

Permalink
WAGE: Fixed couple of memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 6, 2016
1 parent 777536d commit 28a02b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engines/wage/design.cpp
Expand Up @@ -438,6 +438,8 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::ReadStream &in) {
dst++;
}
}

tmp.free();
}

void Design::drawFilledRect(Graphics::Surface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType) {
Expand Down
3 changes: 3 additions & 0 deletions engines/wage/entities.cpp
Expand Up @@ -48,6 +48,7 @@
#include "wage/wage.h"
#include "wage/entities.h"
#include "wage/design.h"
#include "wage/script.h"
#include "wage/world.h"

#include "common/memstream.h"
Expand Down Expand Up @@ -127,6 +128,8 @@ Scene::Scene(String name, Common::SeekableReadStream *data) {
}

Scene::~Scene() {
delete _script;
delete _textBounds;
}

void Scene::paint(Graphics::Surface *surface, int x, int y) {
Expand Down

0 comments on commit 28a02b8

Please sign in to comment.