javascript - Setting properties of object to undefined deallocates memory? -
i have lot of collections lot of records , need manage them, loading , unloading them depending on think user going need.
the collections like:
{ users { 1: { id: 1, name: 'jhon', }, 2: { ... }, ... }, products: { ... } }
i using redux cannot mutate collections make changes on them, have redeclare them. need purge users collection users, except 1 logged application.
to assign undefined of users purge, operation (of course don't manually write every id):
{ users: { ...users, 1: undefiend, 2: users[2], 3: undefined ... } }
¿does deallocate memory used whole collection?
Comments
Post a Comment