From a8b635e4cdac9a42d2c81517576bb970e5f9d06f Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Thu, 16 Nov 2017 22:31:27 -0600 Subject: FULLPIPE: Fix leaks of DynamicPhases I am not entirely sure this is a correct fix for these leaks; there is still the issue of the last member of _dynamicPhases being invalidated and not removed sometime before the destruction of Movement. Also, some of the items in this array are not actually owned by Movement so deleting them will cause double-frees or use-after-frees. It may be the case that a second list should be maintained instead containing only the objects that are created internally within Movement. Further testing will tell for sure. --- engines/fullpipe/statics.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/fullpipe/statics.h') diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index fa893d6118..a30915316d 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -116,6 +116,7 @@ class Movement : public GameObject { int _field_50; int _counterMax; int _counter; + /** a confusing mix of owned and unowned items */ Common::Array _dynamicPhases; int _field_78; PointList _framePosOffsets; -- cgit v1.2.3