aboutsummaryrefslogtreecommitdiff
path: root/Doc/Manual
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2012-09-04 17:54:19 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2012-09-04 17:54:19 +0000
commit2a28514b2702e527d5a55bb4fa93e9f5f0153500 (patch)
tree0438e5bdeb843cac46fbc233d3b97f9e6c7fdfa5 /Doc/Manual
parent33bb317b61126f3c0f377d735044d391b87b715f (diff)
downloadswig-2a28514b2702e527d5a55bb4fa93e9f5f0153500.tar.gz
Improve javafinalize docs, patch from Marvin Greenberg
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13732 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Doc/Manual')
-rw-r--r--Doc/Manual/Java.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/Doc/Manual/Java.html b/Doc/Manual/Java.html
index ed99549b0..858342c43 100644
--- a/Doc/Manual/Java.html
+++ b/Doc/Manual/Java.html
@@ -5489,6 +5489,22 @@ interfaces (implements) for Java class: empty default
<p><tt>%typemap(javafinalize)</tt></p>
<div class="indent">
the <tt>finalize()</tt> method (proxy classes only): default calls the <tt>delete()</tt> method
+
+<p>
+Note that the default javafinalize typemap must contain the full implementation of the finalize method.
+Any customization to this typemap must still declare a java finalize method with the correct signature.
+Note also that the name of the generated "delete" method may be affected by <tt>javadestruct</tt> and <tt>javadestruct_derived</tt> typemaps.
+Below shows an example modifying the finalizer, assuming the <tt>delete</tt> method has been renamed to <tt>swig_delete</tt>.
+</p>
+
+<div class="code"><pre>
+%typemap(javafinalize) SWIGTYPE %{
+ protected void finalize() {
+ swig_delete(); // renamed to prevent conflict with existing delete method
+ }
+]%
+</pre></div>
+
</div>
<p>