best answer > Can you call a destructor in C++ 2024?- QuesHub | Better Than Quora
  • Can you call a destructor in C++ 2024?

    函数 这是 对象

    Questioner:Lucas Carter 2023-05-05 10:26:10
The most authoritative answer in 2024
  • Benjamin Wilson——Works at the International Energy Agency, Lives in Paris, France.

    Local objects are automatically destroyed by compiler when they go out of scope and this is the guarantee of C++ language. In general, special member functions shouldn't be called explicitly. Explicit call to destructor is only necessary when object is placed at particular location in memory by using placement new.read more >>
    +119962023-05-10 10:26:10

About “函数、这是、对象”,people ask:

READ MORE:

QuesHub is a place where questions meet answers, it is more authentic than Quora, but you still need to discern the answers provided by the respondents.

分享到

取消