search for: n_ip

Displaying 1 result from an estimated 1 matches for "n_ip".

Did you mean: n_i
2011 Jan 17
1
isoreg memory leak?
...1300721 10.0 1300642 10.0 ^^^ Looking at the C code, I believe the problem arises as a consequence of using SETLENGTH to resize the result near the very end of isoreg.c, and the solution is to make a copy of iKnots. SEXP R_isoreg(SEXP y) { int n = LENGTH(y), i, ip, known, n_ip; double tmp, slope; SEXP yc, yf, iKnots, ans; const char *anms[] = {"y", "yc", "yf", "iKnots", ""}; /* unneeded: y = coerceVector(y, REALSXP); */ PROTECT(ans = mkNamed(VECSXP, anms)); SET_VECTOR_ELT(ans, 0, y = y);...