ClosureFrame takes ownership of its captured vals.

This commit is contained in:
Zeke Medley 2019-06-21 12:31:10 -07:00
parent d468df2a21
commit b280c62ea5
2 changed files with 4 additions and 3 deletions

View file

@ -41,11 +41,13 @@ Frame::Frame(const Frame* other)
this->break_on_return = false;
this->delayed = false;
// We need to Ref this because the
// destructor will Unref.
if ( other->trigger )
Ref(other->trigger);
for (int i = 0; i < size; i++)
if (frame[i])
Ref(frame[i]);
this->trigger = other->trigger;
this->call = other->call;
}