I would not recommend it. Unless the Subject is logged out, the session would 
not be garbage collected.
Technically this is possible if every subject is ’sure’ to be logged out, but 
that’s is unrealistic in a web application.

> On Feb 16, 2023, at 8:01 AM, Boris Petrov <[email protected]> wrote:
> 
> Hi all,
> 
> I'm wondering is it "safe" to call `setTimeout(-1);` on a Shiro session. That 
> is, after I do that, is that a memory leak? Whenever the `Subject` of that 
> `Session` is GC'd, will the session also be invalidated and removed from the 
> session-manager or that must be done manually? Thanks!
> 
> Regards,
> Boris
> 

Reply via email to