fetch up pyglet [build skip]
This commit is contained in:
parent
0ab71ee2f3
commit
d95e23a7f4
@ -239,6 +239,12 @@ class ShapeBase(ABC):
|
||||
self._group.unset_state_recursive()
|
||||
|
||||
def delete(self):
|
||||
"""Force immediate removal of the shape from video memory.
|
||||
|
||||
It is recommended to call this whenever you delete a shape,
|
||||
as the Python garbage collector will not necessarily call the
|
||||
finalizer as soon as the sprite falls out of scope.
|
||||
"""
|
||||
self._vertex_list.delete()
|
||||
self._vertex_list = None
|
||||
|
||||
|
@ -323,9 +323,9 @@ class Sprite(event.EventDispatcher):
|
||||
def delete(self):
|
||||
"""Force immediate removal of the sprite from video memory.
|
||||
|
||||
This is often necessary when using batches, as the Python garbage
|
||||
collector will not necessarily call the finalizer as soon as the
|
||||
sprite is garbage.
|
||||
It is recommended to call this whenever you delete a sprite,
|
||||
as the Python garbage collector will not necessarily call the
|
||||
finalizer as soon as the sprite falls out of scope.
|
||||
"""
|
||||
if self._animation:
|
||||
clock.unschedule(self._animate)
|
||||
|
Loading…
Reference in New Issue
Block a user