6
Guys, I’m building an API and I need to make requests every three seconds on the server.
Follows the code:
countAcess() {
if (this.menuExa && this.appService.requestValid()) {
this.appService.getCountg()
.subscribe(
data => {
if (data) {
this.monitor.userc = data;
}
});
}
clearTimeout(this.setTimeVerific);
this.setTimeVerific = setTimeout(valida => { this.countAcess(); }, 2500);
}
My problem is memory, filled 16GB of RAM in about 8/10 hours, will lock any machine. How can I empty this memory or even spend less? I know this because, if I disable the function SetTimeOut()
, memory does not inflate consumption
Friend, that’s right! Thank you for asking for an answer
– Wan