Skip to content

Commit 46dec8d

Browse files
committed
fix: GC: remember to signal the GC thread to stop when destroying the table.
1 parent b534b3e commit 46dec8d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

table.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ namespace emulator {
5151
class Table : public std::enable_shared_from_this<Table> {
5252
public:
5353
~Table() {
54+
// Signal the GC thread to stop and wait for it to terminate.
55+
stop_flag_ = true;
5456
if (gc_thread_.joinable()) {
5557
gc_thread_.join();
5658
}

0 commit comments

Comments
 (0)