Closed StraylightRunMOO closed 1 year ago
The following code will create a hanging reference:
$waif::spawn_task this none this {?wait = 1} = args; fork task_id (wait) player:tell("I'M A WAIF!"); endfork kill_task(task_id);
The reference persists until shutdown:
;waif_stats() => ["pending_recycle" -> 0, "total" -> 0] ;$waif:new():spawn_task() => 0 ;waif_stats() => [#118 -> 1, "pending_recycle" -> 0, "total" -> 1]
On shutdown, you will see the warning: WARN: waif_count != n_saved_waifs!
WARN: waif_count != n_saved_waifs!
This commit addresses the issue by freeing the reference created here in tasks.cc:1273.
Nice catch!
Nice job.
The following code will create a hanging reference:
The reference persists until shutdown:
On shutdown, you will see the warning:
WARN: waif_count != n_saved_waifs!
This commit addresses the issue by freeing the reference created here in tasks.cc:1273.