longhair icon indicating copy to clipboard operation
longhair copied to clipboard

Dynamic memory allocation

Open MathijsV opened this issue 7 years ago • 2 comments

There are multiple places in the code where longhair does memory allocation. This is not desirable in a real time environment, because the "new" may take a long time.

Currently, the code has no state object that's passed around, so it has to do "new" calls every time. I would prefer if the library got a state in which memory is kept, so that is does not have to be alloc'ed/dealloc'ed every time it's used.

MathijsV avatar Dec 12 '17 16:12 MathijsV

I hacked something together for my own purposes in https://github.com/MathijsV/longhair/commit/854d77dcda123302b43b405be49652ec66f177a1

MathijsV avatar Dec 12 '17 16:12 MathijsV

Nice =)

I hope other people find it helpful

catid avatar Feb 03 '18 21:02 catid