Skip to content

Commit

Permalink
Allow a client to clear an IntrustiveRefCntPtr (deliberately leaking …
Browse files Browse the repository at this point in the history
…the referenced object).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128007 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
tkremenek committed Mar 21, 2011
1 parent 0891d99 commit 47f0f18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/llvm/ADT/IntrusiveRefCntPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ namespace llvm {
other.Obj = Obj;
Obj = tmp;
}

void resetWithoutRelease() {
Obj = 0;
}

private:
void retain() { if (Obj) Obj->Retain(); }
Expand Down

0 comments on commit 47f0f18

Please sign in to comment.