> -----Original Message----- > From: Andi Vajda [mailto:va...@apache.org] > Sent: den 30 augusti 2013 15:13 > To: pylucene-dev@lucene.apache.org > Subject: Re: JCC for Java -> C++ and initializeClass > > > On Fri, 30 Aug 2013, Toivo Henningsson wrote: > > > I've been using JCC successfully for a number of months for wrapping Java > code to use in a C++ program. > > My question is about initializeClass. Right now, I'm calling > > > > mypackage::MyClass::initializeClass(false); > > > > on some of my classes during initialization (in the C++ code), as I got the > impression that I am supposed to do. But it doesn't seem to make a difference > if > I remove those calls. Is it still required, and if it is, for what? > > initializeClass() is called for you, lazily, when the C++ wrapper class > constructor is > called for the first time. > You can see this in the generated .h files.
Ok, great! So it's only if I need to use something inside of a class before creating any instances that I need to call initializeClass()? > If initializeClass() were not called for you, your code would be crashing > really > fast. I suspected as much :) / Toivo Toivo Henningsson, PhD Software Engineer Simulation & Optimization R&D Phone direct: +46 46 286 22 11 Email: toivo.hennings...@modelon.com Modelon AB Ideon Science Park SE-223 70 Lund, Sweden Phone: +46 46 286 2200 Fax: +46 46 286 2201 Web: http://www.modelon.com This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Modelon does not accept or assume any liability or responsibility for any use of or reliance on this email.