Skip to content
Permalink
Browse files

ZVISION: Plug more memory leaks

  • Loading branch information
bluegr committed Dec 24, 2014
1 parent 75d78c7 commit fa2d8d927b353162ac9ee434b4611e03b22246e8
@@ -114,12 +114,18 @@ PaintControl::PaintControl(ZVision *engine, uint32 key, Common::SeekableReadStre
PaintControl::~PaintControl() {
// Clear the state value back to 0
//_engine->getScriptManager()->setStateValue(_key, 0);
if (_paint)
if (_paint) {
_paint->free();
delete _paint;
if (_brush)
}
if (_brush) {
_brush->free();
delete _brush;
if (_bkg)
}
if (_bkg) {
_bkg->free();
delete _bkg;
}
}

bool PaintControl::onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) {
@@ -73,8 +73,10 @@ TitlerControl::TitlerControl(ZVision *engine, uint32 key, Common::SeekableReadSt
}

TitlerControl::~TitlerControl() {
if (_surface)
if (_surface) {
_surface->free();
delete _surface;
}
}

void TitlerControl::setString(int strLine) {

0 comments on commit fa2d8d9

Please sign in to comment.
You can’t perform that action at this time.