mercredi 3 juillet 2019

Is there a way to Data Watch the Uses of a shared_ptr in visual studio?

Something is holding onto a shared_ptr. I'm wondering if there is a way I can set a Data Watch Breakpoint on the uses of said shared_ptr so I can see the uses increment and decrement. The codebase I'm working in is very large and since we use QT Signals and Slots I'm not 100% sure of how to track what is getting a shared ownership of this.

I've tried googling this question and haven't really found anyone trying to do this. My google fu isn't very strong so I could have missed it. I've also tried just entering the variable name for the data watch breakpoint as

ptr->_Rep->_Uses

to no avail. I just get an empty data watch breakpoint that never breaks.

Aucun commentaire:

Enregistrer un commentaire