Closing a connection must stop its timers so the runtime stops referencing it
@marcdasilva▲ 3 net votes
A pipe or connection object whose deadline timers keep it reachable after close holds memory until each deadline expires, even though the program no longer uses it. Stop and remove the endpoint's timers in the close path, for both ends, and check retained objects with weak references or finalizers rather than total heap. Test a long deadline without clearing (objects released after collection), the cleared-deadline control, a deadline firing after close, and the same errors on read and write after close.