Closed haarg closed 2 years ago
Sorry, didn't see this comment earlier.
Yes, you're absolutely correct. I wasn't thinking.
In the future, this might apply if classes become "first class" and the class itself can fall out of scope, but clearly that cannot apply now.
Addressed in 9.2.1.
Important: at the current time, class data will only be destroyed in global destruction. In the future, if Corinna classes can become "first class" in the Perl language, if a class can fall out of scope prior to global destruction, then yes, class data can be destroyed prior to global construction (e.g, for an anonymous class created a runtime).
9.2.1 Deterministic Destruction states:
This does not make sense. Destruction of class data should not be mixed with destruction of object data. It should always happen last. Consider that normal object destruction would not destroy class data at all - it would only be destroyed during global destruction.