How check if destructor has been called?

Injeckt vinsentlou9 at gmail.com
Tue Sep 13 14:06:42 UTC 2022


Hi, I'm trying to check if destructor has been called, but when 
I'm deleting class object I didn't get any calls from destructor.

myclass.d

     ~this() {
         this.log("\nDestructor\n");
         this._free_trash();
     }


main.d

     try {
         server.server_init(server);
     } catch (Exception e) {
         server.log(e.msg);
         server = null;
     }



More information about the Digitalmars-d-learn mailing list