Arduino_Vector
Arduino_Vector copied to clipboard
Memory leak
G'day Zac. This has been useful to me developing my own version which I have just put into my Github repositories. This version of Vector leaks memory. The problem is in the destructor, ~Vector. To fix it you need to add the line alloc.deallocate(elem, space); // deallocate the whole space Keith
Keith, I really appreciate this feedback!
Thank you.
Zachary H. Staples Founder & CEO Fathom5 talk: +1(904)412-8505 write: [email protected] web: https://fathom5.co
From: Keith Hungerford [email protected] Sent: Saturday, August 31, 2019 8:50:48 PM To: zacsketches/Arduino_Vector [email protected] Cc: Subscribed [email protected] Subject: [zacsketches/Arduino_Vector] Memory leak (#4)
G'day Zac. This has been useful to me developing my own version which I have just put into my Github repositories. This version of Vector leaks memory. The problem is in the destructor, ~Vector. To fix it you need to add the line alloc.deallocate(elem, space); // deallocate the whole space Keith
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/zacsketches/Arduino_Vector/issues/4?email_source=notifications&email_token=ABY4I6KFEYHVKOU43ZN6YFLQHMNXRA5CNFSM4ISVJPH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HITV4AA, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY4I6KVBVJH2OBBZPE3HU3QHMNXRANCNFSM4ISVJPHQ.