Storing C++ data in an instance field using CNI?

Bryce McKinlay mckinlay@redhat.com
Sat May 29 18:51:00 GMT 2004


Paul Gear wrote:
>Bryce McKinlay wrote:
>>>>...
>>I'm thinking of adding something like "RawDataMarked" which would be
>>like RawData but would be checked by the GC. This way you could allocate
>>a native struct using JvAllocBytes(), and it would be automatically
>>freed when the Java object becomes unreachable. No need for a finalizer.
>>>>>>It's like you're reading my mind, man! <g>
>>That's exactly what i'm looking for. I want my native structure to be
>checked and freed by the GC. I think i might just declare it as an
>Object for now - should that do the trick?
>>
FYI: I have checked in a patch to implement "RawDataManaged" and make 
the JvAllocBytes function public:
http://gcc.gnu.org/ml/java-patches/2004-q2/msg00517.html
Regards
Bryce


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /