[Stk] Bad memory allocation

Gary Scavone gary at ccrma.Stanford.EDU
Thu May 15 09:25:08 PDT 2014


Did you look at the code (line 293 of Stk.cpp)?

If the requested new size is bigger than the old size, it reallocates the buffer.  If the new size is smaller, it simply changes the “publicized” size of the buffer (without reallocation).

I’m not really sure what you were talking about in your email.

—gary

On May 15, 2014, at 11:50 AM, Eric Vaughn <sigvatr at gmail.com> wrote:

> Resizing an StkFrames initially turns the data pointer to 0 without doing any memory allocation stuff. I had huge memory leaks coming from that. Is there a good reason for this? I was using resize because there is no other good way to clear an StkFrames object or directly tinker with the memory it uses.
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk




More information about the Stk mailing list