Want to change the default wrapping behavior of char* in swig java <p>So there's this line in the swig documentation</p> <blockquote> <p>When <code>char *</code> members of a structure are wrapped, the contents are assumed to be dynamically allocated using malloc or new (depending on whether or not SWIG is run with the -c++ option). When the structure member is set, the old contents will be released and a new value created.</p> </blockquote> <p>I don't want the old contents to be released from memory because I'm using some sort of <code>char*</code> buffer, and I also need the default setter. I can use the <code>%ignore &lt;field&gt;</code> to overwrite the getter but then I'll lose the default setter. Can someone please help? Thanks.</p>