Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
Fuga de memoria Js ArrayBuffer

Tengo un problema con ArrayBuffer. No entiendo por qué la memoria no se libera. Tal vez alguien sepa cómo solucionarlo.

Codigo en github

vídeo en youtube

 // Main thread const startLongTask = () => { setLoading(true); const worker = new Worker( new URL("../webworkers/matrix.js", import.meta.url) ); worker.onmessage = ({ data }) => { setLoading(false); console.log(data); worker.terminate(); }; const matrix = new Uint8Array(1000000000); worker.postMessage(matrix, [matrix.buffer]); };
 // Worker thread onmessage = ({ data: matrix }) => { const matrixView = new DataView(matrix.buffer); for (let i = 0; i < matrix.byteLength; i++) { matrixView.setInt8(i, i >= 255 ? 255 : i); } postMessage(matrix, [matrix.buffer]); };
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Parece que hay una pérdida de memoria debido a console.log(data);

Con consola.log

https://monosnap.com/file/Qwbu7LRGWFaHptic1bG5YLsVGyKj7d

Sin consola.log

https://monosnap.com/file/3yrkGDeCQo1jWxQ10SSDUDFXvd9g8T

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!