When browsing C++ code, it can be tricky to know when destructors are called.
So a feature that would be useful for me is if I can do a cross reference search on a the calls to a destructor, such as:
ClassName::~ClassName()
If I can highlight the ~ClassName and press Ctrl+/ to find all the instances of when the destructor is called, not just when it is declared.
For example, if there is a block of code like this:
{
ClassName classInstance;
} <----- The destructor is called here
So when showing all the cross-references of the destructor, the closing brace of the above block would be shown as the compiler will add a call to the destructor here.
Similarly if we have a "delete ClassInstancePointer"
then we know the destructor will get called upon this deletion. Now this one is tricky because we don't know if base class or derived class destructor is called, so maybe all classes that derive from the type of ClassInstancePointer could be listed in the cross-reference results?
I realize this can be a tricky feature, and maybe won't catch everything, such as when a destructor is called when shared_ptr or templates are used, but I think it would still be very useful to have this feature for the simple destructor calling on the stack, or when "delete" is used.