Skip to content

Commit 2db2a90

Browse files
committed
remove whole finalizer
1 parent a5874bd commit 2db2a90

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/assign.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
#include "data.table.h"
22

3-
static void finalizer(SEXP p)
4-
{
5-
SEXP x;
6-
R_len_t n, l, tl;
7-
if(!R_ExternalPtrAddr(p)) internal_error(__func__, "didn't receive an ExternalPtr"); // # nocov
8-
p = R_ExternalPtrTag(p);
9-
if (!isString(p)) internal_error(__func__, "ExternalPtr doesn't see names in tag"); // # nocov
10-
l = LENGTH(p);
11-
tl = TRUELENGTH(p);
12-
if (l<0 || tl<l) internal_error(__func__, "l=%d, tl=%d", l, tl); // # nocov
13-
n = tl-l;
14-
if (n==0) {
15-
// gc's ReleaseLargeFreeVectors() will have reduced R_LargeVallocSize by the correct amount
16-
// already, so nothing to do (but almost never the case).
17-
return;
18-
}
19-
x = PROTECT(allocVector(INTSXP, 50)); // 50 so it's big enough to be on LargeVector heap. See NodeClassSize in memory.c:allocVector
20-
// INTSXP rather than VECSXP so that GC doesn't inspect contents after LENGTH (thanks to Karl Miller, Jul 2015)
21-
SETLENGTH(x,50+n*2*sizeof(void *)/4); // 1*n for the names, 1*n for the VECSXP itself (both are over allocated).
22-
UNPROTECT(1);
23-
return;
24-
}
25-
263
void setselfref(SEXP x) {
274
if(!INHERITS(x, char_datatable)) return; // #5286
285
SEXP p;

0 commit comments

Comments
 (0)