mirror of
https://github.com/Hopiu/django.git
synced 2026-04-21 23:34:50 +00:00
Loaded real destructor functions before garbage time
This is an alternative patch to the unsuccessful b43b27bcd.
This commit is contained in:
parent
ad82d0003b
commit
60879a2193
1 changed files with 5 additions and 0 deletions
|
|
@ -125,6 +125,11 @@ class IOBase(GEOSBase):
|
|||
def __init__(self):
|
||||
# Getting the pointer with the constructor.
|
||||
self.ptr = self._constructor()
|
||||
# Loading the real destructor function at this point as doing it in
|
||||
# __del__ is too late (import error).
|
||||
self._destructor.func = self._destructor.get_func(
|
||||
*self._destructor.args, **self._destructor.kwargs
|
||||
)
|
||||
|
||||
def __del__(self):
|
||||
# Cleaning up with the appropriate destructor.
|
||||
|
|
|
|||
Loading…
Reference in a new issue