Comments (4)
It can be, I am not the best expert in C/C++ :) What should I be doing to make a better usage of the memory?
from arest.
if( int_variables[variables_index<NUMBER_VARIABLES){
code
}
else
do nothing?
You are using templates and not a c++ expert? Someone should really have a look at your code or it might end with a lot of crashes or unexpected behavior.
from arest.
Agreed for that, there should be a check if we already filled the array or not. I'll make sure to add it.
Also what did you mean by "reallocate the memory"? Is that the same issue?
As I said, I have a good knowledge of C++, otherwise I wouldn't have created this library, but I don't claim to know all. I also have a series of test based on Node.js that I run on a live Arduino after each modification of the library to make sure all the functionalities are working.
from arest.
You can use static array size (like right now) and check for overflow (code above) or you can dynamically reallowcate the array and make it variable like a string or a c++ vector. Static should be smaller implementation and fine. just check for overflows to not exceed the array limit and write to memory the function shouldnt write to.
from arest.
Related Issues (20)
- ESP32 Disconnecting HOT 2
- arest.io problem HOT 3
- output pin set to low at startup
- Issue with multiple Custom functions
- Unable to create a new account HOT 2
- Request example sketch for local use of API key HOT 1
- function name gets confused after 6 characters HOT 1
- 'class aREST' has no member named 'get_topic' HOT 3
- Limitations HOT 1
- ethernet_cloud sketch don't run HOT 2
- https://dashboard.arest.io/devices is not providing any way to add devices HOT 1
- Why is support for text and float variables restricted?
- aREST using UIPEthernet stack failed HOT 1
- Multiple warnings ISO C++ forbids converting a string constant to 'char*' [-Write-strings]
- To support Ethernet2.h library, this should be "ethernet_h"
- Does aREST support the Arduino Uno WiFi r2 Board ? HOT 4
- ESP8266WiFi.h: No such file or directory compilation terminated.
- rest.function() bug: command is improperly passed to function
- How to force send a HTTP 200 command in a rest.function
- CONTROLLINO MAXI AUTOMATION WITH AREST
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arest.