[PATCH] D13061: [Bug 21681] - Fixed: Memory leak in FileArchive::find()
    George Rimar via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep 23 08:22:29 PDT 2015
    
    
  
grimar added a comment.
In http://reviews.llvm.org/D13061#250927, @ruiu wrote:
> File object ownership is complicated, and I'm not sure if this fix is
>  correct. Leaking objects is a bug, but is this safe? Who keeps the
>  ownership of archive files until all linking is complete?
All archive files are ownered by LinkingContext. Files are added as nodes. (like that: ctx->getNodes().push_back(std::move(node));)
LinkingContext looks to be alive all time until link complete.
http://reviews.llvm.org/D13061
    
    
More information about the llvm-commits
mailing list