Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StaticJsonBuffer _size grows #5

Open
HaydenDekker opened this issue May 9, 2017 · 0 comments
Open

StaticJsonBuffer _size grows #5

HaydenDekker opened this issue May 9, 2017 · 0 comments

Comments

@HaydenDekker
Copy link

I'm using this on the Electron and I need a fairly hefty buffer of size 8000.

My understanding is that using "StaticJsonBuffer<8000> jsonBuffer" in a function allocates the buffer on a stack so I placed it globally. In fact my device fell over when trying to use it in a function.

The problem then is that the _size never resets so eventually it over runs and fails to resolve. I could use Dynamic but I have a set size packet anyway.

Is there a way to clear the buffer or delete the object and reset the buffer?

Or should I be using DynamicJsonBuffer?

Thankyou Hayden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant