Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit addb05e

Browse files
authored
Merge pull request #1629 from implausible/fix/persistence-at-struct-destructor
We should clear the persistent cell in structs when they are destroyed
2 parents d3f38a7 + 177a713 commit addb05e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

generate/templates/templates/struct_content.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ using namespace std;
6767
this->raw->{{ fields|payloadFor field.name }} = NULL;
6868
{% endif %}
6969
}
70+
{% elsif field.hasConstructor |or field.isLibgitType %}
71+
this->{{ field.name }}.Reset();
7072
{% endif %}
7173
{% endif %}
7274
{% endif %}

0 commit comments

Comments
 (0)