Skip to content

Instantly share code, notes, and snippets.

@brson
Created March 30, 2011 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brson/893876 to your computer and use it in GitHub Desktop.
Save brson/893876 to your computer and use it in GitHub Desktop.
auto r_ty = ty.expr_ty(e);
auto r2 = incr_all_refcnts(bcx, r.val, r_ty);
bcx = r2.bcx;
auto r_val = load_scalar_or_boxed(bcx, r.val, r_ty);
find_outer_scope_cx(cx).cleanups +=
vec(clean(bind drop_ty(_, r_val, r_ty)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment