JuggerNET Runtime Library v3.6.54.0  3.6.54.0
Public Member Functions | List of all members
Codemesh.JuggerNET.JavaProxyHelper Class Reference

A class that helps dealing with automatically converted .NET objects. We don't want to leak JNI references when passing .NET strings as arguments. In beta2, we correctly converted the System.String instances to Java strings, but nobody was responsible for the JNI handles and we created a nasty reference leak. This class helps by tracking such string instances and cleaning up the references when it is disposed of. More...

Inheritance diagram for Codemesh.JuggerNET.JavaProxyHelper:
Inheritance graph
[legend]
Collaboration diagram for Codemesh.JuggerNET.JavaProxyHelper:
Collaboration graph
[legend]

Public Member Functions

 JavaProxyHelper (int size)
 
 JavaProxyHelper (JavaProxy owner, int size)
 
void Dispose ()
 
long Add (string str)
 
long AddBoolean (Boolean b)
 
long AddChar (Char ch)
 
long AddInt16 (Int16 i)
 
long AddInt32 (Int32 i)
 
long AddInt64 (Int64 i)
 
long AddSingle (Single s)
 
long AddDouble (Double d)
 
void KeepAlive (object o)
 
void Forget (int indexToForget)
 

Detailed Description

A class that helps dealing with automatically converted .NET objects. We don't want to leak JNI references when passing .NET strings as arguments. In beta2, we correctly converted the System.String instances to Java strings, but nobody was responsible for the JNI handles and we created a nasty reference leak. This class helps by tracking such string instances and cleaning up the references when it is disposed of.


The documentation for this class was generated from the following file:

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.