Open exarkun opened 8 months ago
Each call to __init__ allocates memory for the fec matrix. When the object is collected, only the most recently allocated matrix is freed.
__init__
Observable with this program:
import zfec e = zfec.Encoder(255, 256) for i in range(100000): e.__init__(255, 256)
memory usage will grow as the program runs.
Encoder and Decoder should probably refuse multiple __init__ calls.
Encoder
Decoder
... why would anyone call __init__ multiple times?
Other than to cause memory to leak? I can't think of a good reason.
Each call to
__init__
allocates memory for the fec matrix. When the object is collected, only the most recently allocated matrix is freed.Observable with this program:
memory usage will grow as the program runs.
Encoder
andDecoder
should probably refuse multiple__init__
calls.