My code works, but the following warning appears:
swig/python detected a memory leak of type 'time_t *', no destructor found
How can I calm it down ?
My code works, but the following warning appears:
swig/python detected a memory leak of type 'time_t *', no destructor found
How can I calm it down ?
Just add typedef long time_t;
to your SWIG interface file.
Once SWIG knows that time_t
is a native type, it will not be treated as an object that requires memory management.
I got this error whenever I accessed a struct member containing a type that wasn't SWIG wrapped. Not sure if this is your problem (posting your code would help :P), but if so then you could either define your custom time_t in the interface file (just put the C definition in the interface file), or tell SWIG to wrap the (presumably) system header file containing the definition of time_t.