Creating a C/C++ library using Java
Juan Altmayer Pizzorno
juan+gcc-java@altmayer.com
Mon Aug 5 08:59:00 GMT 2002
Hi,
has anybody thought about creating a C/C++ library using Java and gcj?
I haven't looked into the internals closely yet, but it seems to me that at
least the garbage collector would make it difficult (right?). I am not
sure whether there would be actual conflicts, or whether the library would
just behave in an unexpected way (e.g., seem to initiallly leak memory).
Replacing the GC with a reference-counting (pseudo-)GC for that seems difficult
since object references are mapped to C++ pointers and some kind of wrapping
to count the references up and down would be necessary. Also, I imagine the
JVM initialization (System.* object(s), threading package, etc.) might cause
conflicts with the application linking with the (so created) library.
Any thoughts on how to make this possible, or why it would be difficult?
.. Juan
More information about the Java
mailing list