JDevlieghere added inline comments.

================
Comment at: lldb/bindings/interface/SBModule.i:365
+    static void
+    ClearCachedModules();
+
----------------
teemperor wrote:
> JDevlieghere wrote:
> > Maybe we should call this `ClearAllocatedModules` for consistency with the 
> > other APIs? 
> Not sure what's a good name. I would assume from the name 
> `ClearAllocatedModules` that i would delete all allocated modules, but it 
> actually only clears modules that are only kept around for the sake of 
> caching. So this would not actually always work (but it should in the test 
> suite):
> 
> ```
> assert(GetNumberAllocatedModules != 0);
> ClearAllocatedModules();
> assert(GetNumberAllocatedModules == 0); // boom if any of the allocated 
> modules is still needed.
> ```
> 
> (FWIW, LLDB internally calls this "orphaned" modules but that doesn't seem 
> very intuitive either).
> 
> "MaybeClearAllocatedModules", "TryClearAllocatedModules", 
> "ClearOrphanedModules", etc.
How about `GarbageCollectAllocatedModules`? 


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

https://reviews.llvm.org/D83876



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to