boxed: remove __del__ implementation and free in tp_dealloc
This allows us to assume that the wrapper is always valid and remove the _is_valid attribute. One difference now is that g_boxed_free() is called when the wrapper can no longer be used and that breaks the custom glib sources where g_boxed_free() triggers the finalize callback which tries to call into a method of the wrapper. To work around this provide a _clear_boxed() method which allows the wrapper to free the underlying boxed in __del__ where the wrapper is still usable.
Showing with 24 additions and 23 deletions