Skip to content

Commit 2a9b7b0

Browse files
committed
ATRONIX: Do not guard port/state
No idea why it needs to be guarded, but removing it doesn't seem to break anything. The memory issue can be shown by this example: >> forever [modified? %/tmp/a.txt] For every call to modified?, it tries to open a new port, and a new port/state, which is protected from garbage collection, and thus it causes a memory leak (even though it's still reachable, but never free'd).
1 parent f9fed0e commit 2a9b7b0

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/core/c-port.c

-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
if (!IS_BINARY(state)) {
100100
REBSER *data = Make_Binary(size);
101101
REBREQ *req = (REBREQ*)STR_HEAD(data);
102-
Guard_Series(data); // GC safe if no other references
103102
req->clen = size;
104103
CLEAR(STR_HEAD(data), size);
105104
//data->tail = size; // makes it easier for ACCEPT to clone the port

0 commit comments

Comments
 (0)