The layer_utils.py module#

Summary#

clear_is_owner

Use reflection to set the protected IsOwner property to False,

Module detail#

layer_utils.clear_is_owner(obj)#

Use reflection to set the protected IsOwner property to False, preventing the buggy EDBLayer_Cleanup from being called in the destructor.

This must be called on every Layer object obtained from the EDB API (via Clone(), LayerCollection construction, or any other means) to prevent the native EDBLayer_Cleanup destructor from running on Python-owned wrappers and causing memory access violations during garbage collection.