C1426: Explicit Destructor call not allowed here

[ERROR]

Description

Explicit Destructor calls inside member functions without using this are illegal.

Example
  struct A {

  
    void f();

  
    ~A();

  
  };

  
  void A::f() {

  
    ~A(); // illegal

  
    this->~A();  // ok

  
  }

  
Tips

Use the this pointer.