![]() Returns true if the memory is successfully allocated, false otherwise. The new amount of memory to allocate, in bytes. bool ReallocateBytes(size_t nBytes) throw() CHeapPtrBase::ReallocateBytesĬall this method to reallocate memory. In debug builds, an assertion failure will occur if the CHeapPtrBase points to NULL. ![]() Use this operator to call a method in a class pointed to by the CHeapPtrBase object. Returns the value of the CHeapPtrBase::m_pData member variable. Returns the address of the object pointed to by the CHeapPtrBase object. This member variable holds the pointer information. The object pointed to by the CHeapPtrBase is freed, and the CHeapPtrBase::m_pData member variable is set to NULL. CHeapPtrBase::FreeĬall this method to delete an object pointed to by a CHeapPtrBase. As a matter of fact I would call it bad style to add an empty, pointless destructor like that. the actual fuel consumption grand total value is identical or equivalent to a. You do not need an empty destructor at all. Then, several data sets recorded over the several record periods are read. That's not a problem on MSVC but can and will cause problems with other compilers. Releases ownership of a pointer, sets the CHeapPtrBase::m_pData member variable to NULL, and returns a copy of the pointer. because like this the uniqueptr uses 'delete' instead of 'delete' as it should. CHeapPtrBase::DetachĬall this method to release ownership of a pointer. CHeapPtrBase::~CHeapPtrBaseįrees all allocated resources. In debug builds, an assertion failure will occur if the CHeapPtrBase::m_pData member variable currently points to an existing value that is, it's not equal to NULL. When a CHeapPtrBase object takes ownership of a pointer, it will automatically delete the pointer and any allocated data when it goes out of scope. The CHeapPtrBase object will take ownership of this pointer. CHeapPtrBase::AttachĬall this method to take ownership of an existing pointer. The number of bytes of memory to allocate. ![]() bool AllocateBytes(size_t nBytes) throw() ![]() Header: atlcore.h CHeapPtrBase::AllocateBytesĬall this method to allocate memory. See these classes for implementation examples. The derived classes, for example, CHeapPtr and CComHeapPtr, add their own constructors and operators. This class forms the basis for several smart heap pointer classes. Click on Select All button (on the right) Click on Refactor button (on the bottom) Custom constructor. Members Public constructors NameĬall this method to take ownership of an existing pointer.Ĭall this method to release ownership of a pointer.Ĭall this method to delete an object pointed to by a CHeapPtrBase. By default CRT routines are used to allocate and free memory. The object type to be stored on the heap. This class and its members cannot be used in applications that execute in the Windows Runtime. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |