<div dir="ltr">Hey.<div><br></div><div>I'm facing with very strange behaviour of clang via JNI.</div><div>I have java class and native methods call libclang-c functions.</div><div><br></div><div>So i have to hold CXIndex and CXTranslationUnit pointers</div>
<div>and hold reference in java objects to instances.</div><div><br></div><div>If i do everything in the same native call (create index, parse, tokenize, dispose), it's okay.</div><div>But if i do in few native function invocations, CXIndex and CXTranslationUnit are corrupted (even if the CXIndex and CXTranslationUnit pointers are the same).</div>
<div><br></div><div>I can provide additional info and full source code if necessary.</div><div>Are there any obvious limitations or anybody with such experience?</div><div><br></div><div>Regards, Anton.</div></div>