Hi, there

I have used java-lucene for a couple of years and are now moving to clucene.

I have a question related to the highlighter of clucene in terms of memory
release of the fragments returned by highlighter. I read the source code of
the highlighter and realized that the result returned by getBestFragments
need to be released. However, the system always crashes, reporting
crtIsValidHeapPointer. 

I compiled clucene with Visual Studio 2010 (Windows 7).

Here is the sample code I tried. (I have tried to free, delete, delete[]
just want to make sure I did not use the wrong one; all crashed)

lucene::util::StringReader r(content);
TokenStream* ts = _pAnalyzer->tokenStream(T("field"), &r);
_TCHAR** hleds = hilighter.getBestFragments(ts, copiedLine, 1);
if (hleds) _CLDELETE_CARRAY_ALL(hleds);

Is it because I cannot free memory allocated by the dll of lucene-contribs?
If that is the case, how can I solve this memory leak problem?  

Millions of thanks.

--yunwen


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to