2011/3/25 Itamar Syn-Hershko <ita...@code972.com>: > I think that's the main leak we have in BS2 for quite some time, and the > most severe in CLucene. I'll be wrong only if there's another such leak > in BS2 :) > > > Why isn't using a smart pointer? aren't scorers some of the objects you > wrapped with smart pointers?
Yes. But they had no reference counting in the first place. So, I used auto_ptr instead of shared_ptr for all Scorers. This removed the memory leak, but now the tests crash, because one (or more) of the Scorers is deleted twice. Using shared_ptr for Scorer also will have an impact on the performance, but on the other side I havn't figured out yet how ownership is transfered between all Scorers and Subscorers. Sometime I think it seems to me that ownership isn't transfered. The way how BS2 is implemented yet, it isn't possible to reuse optional and prohibited scorers. Because BS2 transfers the ownership to the Subscorers. I will stay on this. Veit ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ CLucene-developers mailing list CLucene-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/clucene-developers