function makeCar() {
var car = {
color: "red",
convertible: true
};
return car;
}
I know that local variable car holds a reference to the object, but when the function finish, will the object be released resulting in memory leak?
var x = makeCar()to do?WeakMapandWeakSetcar.