javascript - How to call cleanup code in Angular on browser refresh -
i have server api holds session state in form of managed objects. unfortunately, there no way references managed objects apart when created.
this means there need destroy objects when web application finished them (otherwise accumulate on server , hit limit no more can created). have cleanup code in controller destroy event handlers, don't seem called when user, say, refreshes browser.
what's proper angular-ish way call cleanup code on refresh or close? there such pattern or should server api refined provide way such references? unfortunately, i'm not in position able change server api easily.
Comments
Post a Comment