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:
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.
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.
EncoderandDecodershould probably refuse multiple__init__calls.