New director example

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5087 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-09-06 15:54:07 +00:00
commit e871ca2862
6 changed files with 102 additions and 0 deletions

View file

@ -0,0 +1,29 @@
<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>