@yuneta/gobj-js 7.8.7 → 7.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1134,6 +1134,14 @@
1134
1134
  return;
1135
1135
  }
1136
1136
  if (gobj.__refs__ > 0) log_error(`${gobj_short_name(gobj)}: gobj DESTROYING with references: ${gobj.__refs__}`);
1137
+ if (gobj.playing) {
1138
+ log_error(`Destroying a PLAYING gobj: ${gobj_full_name(gobj)}`);
1139
+ gobj_pause(gobj);
1140
+ }
1141
+ if (gobj.running) {
1142
+ log_error(`Destroying a RUNNING gobj: ${gobj_full_name(gobj)}`);
1143
+ gobj_stop(gobj);
1144
+ }
1137
1145
  gobj.obflag |= obflag_t.obflag_destroying;
1138
1146
  let trace_creation = __yuno__ && gobj_read_bool_attr(__yuno__, "trace_creation");
1139
1147
  if (trace_creation) trace_machine(sprintf("💔💔⏩ destroying: %s", gobj_full_name(gobj)));
@@ -1143,14 +1151,6 @@
1143
1151
  parent.gclass.gmt.mt_child_removed(parent, gobj);
1144
1152
  }
1145
1153
  if (gobj.gobj_flag & gobj_flag_t.gobj_flag_service) _deregister_service(gobj);
1146
- if (gobj.playing) {
1147
- log_error(`Destroying a PLAYING gobj: ${gobj_full_name(gobj)}`);
1148
- gobj_pause(gobj);
1149
- }
1150
- if (gobj.running) {
1151
- log_error(`Destroying a RUNNING gobj: ${gobj_full_name(gobj)}`);
1152
- gobj_stop(gobj);
1153
- }
1154
1154
  gobj_unsubscribe_list(gobj, gobj.dl_subscriptions, true);
1155
1155
  gobj_unsubscribe_list(gobj, gobj.dl_subscribings, true);
1156
1156
  if (parent) {