From 177a71327aed614e2b3a306dbac3190d5affd415 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Wed, 13 Feb 2019 14:03:35 -0700 Subject: [PATCH] We should clear the persistent cell in structs when they are destroyed --- generate/templates/templates/struct_content.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generate/templates/templates/struct_content.cc b/generate/templates/templates/struct_content.cc index 9840cfe4f..0c7b9e4f1 100644 --- a/generate/templates/templates/struct_content.cc +++ b/generate/templates/templates/struct_content.cc @@ -67,6 +67,8 @@ using namespace std; this->raw->{{ fields|payloadFor field.name }} = NULL; {% endif %} } + {% elsif field.hasConstructor |or field.isLibgitType %} + this->{{ field.name }}.Reset(); {% endif %} {% endif %} {% endif %}