From 02cdb126eb0ad806594f1e6272a4a806dc186ae3 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Thu, 29 Nov 2018 17:07:56 -0800 Subject: [PATCH] Fix memory leak in bytes.Value (resolve openfl/openfl#2075) --- project/src/utils/Bytes.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/project/src/utils/Bytes.cpp b/project/src/utils/Bytes.cpp index 5d063b80c..3a6333c61 100644 --- a/project/src/utils/Bytes.cpp +++ b/project/src/utils/Bytes.cpp @@ -160,6 +160,10 @@ namespace lime { } + } else if (usingValue.find (this) != usingValue.end ()) { + + usingValue.erase (this); + } b = data;