swig/Examples/java/callback/index.html
William S Fulton e871ca2862 New director example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5087 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-06 15:54:07 +00:00

29 lines
648 B
HTML

<html>
<head>
<title>SWIG:Examples:java:callback</title>
</head>
<body bgcolor="#ffffff">
<tt>SWIG/Examples/python/extend/</tt>
<hr>
<H2>Implementing C++ callbacks in Java</H2>
<tt>$Header$</tt><br>
<p>
This example illustrates how to use directors to implement C++ callbacks in Java.
</p>
<p>
Please note that unlike Python, Java does not have an equivalent concept of
weak references, so the program has to manually clean up after objects. The
implication of this is that the <code>Caller</code> class cannot claim
ownership of the <code>Callback</code> object in <code>Caller.setCallback()</code>
and delete it.
</p>
<hr>
</body>
</html>