From the sip documentation:
If state is not NULL then the location it points to is set to
describe the state of the returned C/C++ instance and is the
value returned by any %ConvertToTypeCode. The calling code
must then release the value at some point to prevent a memory
leak by calling sipReleaseType().
These methods were only calling sipReleaseType in the case that
an error occurred, which is incorrect -- it should always be
called.