[Lldb-commits] [PATCH] D116162: [lldb/python] Fix dangling Event and CommandReturnObject references

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 23 16:10:09 PST 2021


mib accepted this revision.
mib added a comment.
This revision is now accepted and ready to land.

This patch looks good to me, however, may be it would be good to have a `IsInitialized`/ `IsCleared` method for all SB-types to make sure the object hasn't been cleared after going out-of-scope ?

I'm suggesting this because not all SB-types have a `IsValid` method and for those who have it, the implementation varies a lot from class to class. So comparing the SB object against its default constructed value could be a way to check if the object was well-formed.

Having the object reseted by SWIG if it goes out-of-scope could collide with this approach. What do you think ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116162/new/

https://reviews.llvm.org/D116162



More information about the lldb-commits mailing list