Question: As I know the store is a list of states, each state has direct access to his previous or next state. this list is saved in applications memory, if I have a huge amount of data and each state is too big to be saved in every state. How can I permanently delete old store objects to avoid overstock of memory?

at this moment my code looks like this:

```
export const REDUCERS = {
    login: loginReducer,
    register: registerReducer,
    profile: profileReducer,
    company: companyReducer,
    balance: balanceReducer
}
const SdkReducer = compose(storeLogger(), combineReducers)(REDUCERS);

export function reducer(state: any, action: any) {
    if(action.type === 'RESET_STORE'){
        return undefined;
    }

    return SdkReducer(state, action);
}

```

When 'RESET\_STORE' is called root reducer returns 'udefined', But, as I know, there is still saved the old state of the store, which contains old data. I want to delete it permanently. To free some memory.

Answer: 
```
const initialState = appReducer({}, {})

const rootReducer = (state, action) => {
 if (action.type === 'RESET_STORE') {
   state = initialState
 }
 return appReducer(state, action)
}

```
Your understanding of ngrx is a little off. ngrx doesn't actually hold onto all previous state. The idea behind ngrx is that if you do it right, the same set of actions and payloads should always produce the same application state, in this sense, the record of actions and payloads is a complete history of your app state at each point in time. 

You have no need to do what you're describing. If you're having memory issues, you're probably inadverdently creating a leak somewhere.