Commit f7620fb9 authored by Сковорода Никита Андреевич's avatar Сковорода Никита Андреевич Committed by Fedor Indutny
Browse files

tls_wrap: Unlink TLSWrap and SecureContext objects

This makes `TLSWrap` and `SecureContext` objects collectable by the
incremental gc.

`res = null` destroys the cyclic reference in the `reading` property.
`this.ssl = null` removes the remaining reference to the `TLSWrap`.
`this.ssl._secureContext.context = null` removes the reference to
the `SecureContext` object, even though there might be references
to `this.ssl._secureContext` somewhere.

The `reading` property will now throw an error if accessed after the
socket is closed, but that should not happen.

PR-URL: https://github.com/iojs/io.js/pull/1580


Reviewed-By: default avatarFedor Indutny <fedor@indutny.com>
Reviewed-By: default avatarShigeki Ohtsu <ohtsu@iij.ad.jp>
parent dacc1fa3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment