BUGFIX: Memory Leak in NetscriptPorts (#399)

Co-authored-by: Snarling <84951833+Snarling@users.noreply.github.com>
This commit is contained in:
T.J. Eckman
2023-02-27 19:54:04 -05:00
committed by GitHub
parent 9d504b0dfb
commit 33f0150d25
15 changed files with 169 additions and 190 deletions

View File

@@ -15,9 +15,7 @@ the element that is read is removed from the port.
The :js:func:`read`, :js:func:`write`, :js:func:`tryWrite`, :js:func:`clear`, and :js:func:`peek`
Netscript functions can be used to interact with ports.
Right now, there are only 20 ports for Netscript, denoted by the number 1
through 20. When using the functions above, the ports are specified
by passing the number as the first argument and the value as the second.
When using the functions above, the ports are specified by passing the number as the first argument and the value as the second.
The default maximum capacity of a port is 50, but this can be changed in Options > System. Setting this too high can cause the game to use a lot of memory.
.. important:: The data inside ports are not saved! This means if you close and re-open the game, or reload the page then you will lose all of the data in the ports!