search for: destroyconstantimpl

Displaying 3 results from an estimated 3 matches for "destroyconstantimpl".

2004 Nov 15
0
[LLVMdev] LLVM and memory leaks
...t; > If this is a serious issue, it would be straight-forward to add a global > function to flush out unused constants. I would be happy to accept a > patch to do that. Here is an implementation of this -- there are some things you might not like about it: 1) I had to make the private destroyConstantImpl method public to access it from the template class ValueMap since there is no good way to declare it as a friend. 2) I keep the types in a std::vector so I can easily drop all references and delete them without going through all the type maps - this adds a little bit of overhead, but there sho...
2004 Nov 12
2
[LLVMdev] LLVM and memory leaks
On Thu, 11 Nov 2004, Morten Ofstad wrote: > Well, I already tried that, but the destructors crash because they are > referencing other things which are being destroyed - Constants are Users > of each other and there is no easy way to destroy them in the right > order. There are ways around this, but it turns into a two-pass operation: loop over all constants to drop their uses, then
2004 Nov 16
2
[LLVMdev] LLVM and memory leaks
...sue, it would be straight-forward to add a global > > function to flush out unused constants. I would be happy to accept a > > patch to do that. > > Here is an implementation of this -- there are some things you might not > like about it: > > 1) I had to make the private destroyConstantImpl method public to access > it from the template class ValueMap since there is no good way to > declare it as a friend. That's fine in principle, though if you make the clearAllValueMaps function be a static method in Type this is unneeded I think. > 2) I keep the types in a std::vecto...