Skip to content

Commit 42a89b6

Browse files
committed
del instead of assigning None
1 parent 12c65be commit 42a89b6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sounddevice.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,8 +2489,6 @@ class _CallbackContext:
24892489
"""Helper class for re-use in play()/rec()/playrec() callbacks."""
24902490

24912491
blocksize = None
2492-
data = None
2493-
out = None
24942492
frame = 0
24952493
frames: int
24962494
input_channels = output_channels = None
@@ -2623,8 +2621,8 @@ def callback_exit(self):
26232621
def finished_callback(self):
26242622
self.event.set()
26252623
# Drop temporary audio buffers to free memory
2626-
self.data = None
2627-
self.out = None
2624+
del self.data
2625+
del self.out
26282626
# Drop CFFI objects to avoid reference cycles
26292627
self.stream._callback = None
26302628
self.stream._finished_callback = None

0 commit comments

Comments
 (0)