CNetscapeMemObject
Purpose
CNetscapeMemObject overrides the new and delete operators so that memory is
allocated using the Netscape Plugin API methods
NPN_MemAlloc
and
NPN_MemFree. Any class that inherits
from CNetscapeMemObject will also inherit this behavior.
Dependencies
- define.h (from the standard C library)
- npapi.h (from the Plug-in SDK)
Methods
Members
None
Syntax
void*
CNetscapeMemObject::operator new(size_t size)
Purpose
Overrides the new operator so that memory is allocated using the
Netscape Plug-in API method
NPN_MemAlloc
Parameters
The parameters are passed automatically. Use the new operator as normal.
Return Value
A pointer to the newly allocated object. It is automatically cast to the type of
the inheriting object.
Syntax
void
CNetscapeMemObject::operator delete( void* theThing, size_t size )
Purpose
Overrides the delete operator so that memory is freed using the
Netscape Plug-in API method
NPN_MemFree
Parameters
The parameters are passed automatically. Use the delete operator as normal.
Return Value
None