Changeset 27208 in webkit for trunk/JavaScriptCore/wtf/RefPtr.h
- Timestamp:
- Oct 28, 2007, 9:37:37 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/RefPtr.h
r27103 r27208 1 1 // -*- mode: c++; c-basic-offset: 4 -*- 2 2 /* 3 * This file is part of the KDE libraries 4 * Copyright (C) 2005, 2006 Apple Computer, Inc. 3 * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved. 5 4 * 6 5 * This library is free software; you can redistribute it and/or … … 29 28 namespace WTF { 30 29 30 enum PlacementNewAdoptType { PlacementNewAdopt }; 31 31 32 template <typename T> class PassRefPtr; 32 33 33 template <typename T> class RefPtr 34 { 34 template <typename T> class RefPtr { 35 35 public: 36 36 RefPtr() : m_ptr(0) {} … … 39 39 // see comment in PassRefPtr.h for why this takes const reference 40 40 template <typename U> RefPtr(const PassRefPtr<U>&); 41 42 // Special constructor for cases where we overwrite an object in place. 43 RefPtr(PlacementNewAdoptType) { } 41 44 42 45 ~RefPtr() { if (T *ptr = m_ptr) ptr->deref(); } … … 66 69 67 70 private: 68 T *m_ptr;71 T* m_ptr; 69 72 }; 70 73
Note:
See TracChangeset
for help on using the changeset viewer.