Skip to content

Commit

Permalink
fix(zscript): stale data in destructors
Browse files Browse the repository at this point in the history
scripted objects weren't clearing data used by the destructor when being cleared, leading to future objects referencing the stale data if they didn't have a destructor of their own to overwrite it.
  • Loading branch information
Moosh64 committed Jan 18, 2024
1 parent cf9942a commit 6251b0f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/user_object.cpp
Expand Up @@ -204,6 +204,7 @@ void user_object::clear_nodestruct()
data.clear();
reserved = false;
owned_vars = 0;
destruct.clear();
}
void user_object::clear()
{
Expand Down

0 comments on commit 6251b0f

Please sign in to comment.