agentsqripts
Version:
Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems
20 lines (15 loc) • 506 B
JavaScript
let globalCache = {};
let unboundedArray = [];
function cacheData(key, value) {
// Unbounded cache growth - scalability issue
globalCache[key] = value;
}
function addToArray(item) {
// Unbounded array growth
unboundedArray.push(item);
}
setInterval(() => {
// Memory leak through closure
const largeObject = new Array(1000000).fill('data');
addToArray(largeObject);
}, 1000);