Search completed in 0.86 seconds.
21 results for "NPN_MemAlloc":
Your results are loading. Please wait...
NPN_MemAlloc - Archive of obsolete content
syntax #include <npapi.h> void *npn_memalloc (uint32 size); parameters the function has the following parameters: size size of memory, in bytes, to allocate in the browser's memory space.
... description the plug-in calls npn_memalloc to allocate a specified amount of memory in the browser's memory space.
... if you allocate saved instance data with npp_destroy, be sure to use npn_memalloc to allocate memory.
...And 4 more matches
Memory - Plugins
npn_memalloc allocates memory from the browser's memory space.
...use this function to free memory allocated with npn_memalloc.
... allocating and freeing memory to allocate memory and free memory, use these paired functions: npn_memalloc allocates a specified amount of memory in the browser's memory space.
...And 14 more matches
Initialization and Destruction - Plugins
however, because np_initialize is called at the end of the initialization process, you can call other methods, such as npn_memalloc and npn_status, from np_initialize.
... to ensure that the browser does not crash or leak memory when the saved data is discarded, the buf field should be a flat structure (a simple structure with no allocated substructures) allocated with npn_memalloc, as in this example: char* mydata = "here is some saved data.\n"; int32 mylength = strlen(mydata) + 1; *save = (npsaveddata*) npn_memalloc(sizeof(npsaveddata)); (*save)->len = mylength; (*save)->buf = (void*) npn_memalloc(mylength); strcpy((*save)->buf, mydata); if you allocate saved instance data in npp_destroy, be sure to allocate memory with this function, since the browser can delete ...
...the saved data with the equivalent of npn_memalloc at any time.
...*/ useragent = (char*) npn_memalloc(strlen(result) + 1); if (useragent == null) return nperr_out_of_memory_error; /* copy the string to your memory.
NPN_MemFree - Archive of obsolete content
syntax #include <npapi.h> void npn_memfree (void* ptr); parameters the function has the following parameters: ptr block of memory previously allocated using npn_memalloc.
... description npn_memfree deallocates a block of memory that was allocated using npn_memalloc only.
... see also npn_memalloc ...
NPN_GetAuthenticationInfo - Archive of obsolete content
if the function succeeds, the result buffer will be allocated with npn_memalloc; the plugin is responsible for freeing the buffer.
...if the function succeed, the result buffer will be allocated with npn_memalloc; the plugin is responsible for freeing the buffer.
NPN_MemFlush - Archive of obsolete content
description the plug-in calls npn_memflush() when it is not possible to call npn_memalloc(), for example, when calling system apis that indirectly allocate memory.
...in general, plug-ins should use npn_memalloc() to allocate memory in the browser's memory space, since this function automatically frees cached data if necessary to fulfill the request.
NPP_Destroy - Archive of obsolete content
to ensure that the browser does not crash or leak memory when the saved data is discarded, npsaveddata's buf field should be a flat structure (a simple structure with no allocated substructures) allocated with npn_memalloc.
... see also npp_new, np_shutdown, npp, npn_memalloc, npsaveddata ...
NPSavedData - Archive of obsolete content
buf pointer to a memory buffer allocated by the plug-in with npn_memalloc().
...you can use the plug-in's npp_destroy() function to allocate an npsaveddata object using the npn_memalloc() function, fill in the fields, and return it to the browser as an output parameter.
Plug-in Development Overview - Gecko Plugin API Reference
use the npn_memalloc method to allocate memory from the browser.
... use the npn_memfree method to free memory allocated with npn_memalloc.
Plug-in Development Overview - Plugins
use the npn_memalloc method to allocate memory from the browser.
... use the npn_memfree method to free memory allocated with npn_memalloc.
Index - Archive of obsolete content
3654 npn_memalloc npapi, needsmigrationreview, plugins allocates memory from the browser's memory space.
Index of archived content - Archive of obsolete content
er npn_getstringidentifiers npn_geturl npn_geturlnotify npn_getvalue npn_getvalueforurl npn_hasmethod npn_hasproperty npn_identifierisstring npn_intfromidentifier npn_invalidaterect npn_invalidateregion npn_invoke npn_invokedefault npn_memalloc npn_memflush npn_memfree npn_pluginthreadasynccall npn_posturl npn_posturlnotify npn_releaseobject npn_releasevariantvalue npn_reloadplugins npn_removeproperty npn_requestread npn_retainobject npn_setexception npn_setproperty npn_s...
Browser-side plug-in API - Archive of obsolete content
npn_destroystream npn_forceredraw npn_getauthenticationinfo npn_geturl npn_geturlnotify npn_getvalue npn_getvalueforurl npn_invalidaterect npn_invalidateregion npn_memalloc npn_memflush npn_memfree npn_newstream npn_pluginthreadasynccall npn_poppopupsenabledstate npn_posturl npn_posturlnotify npn_pushpopupsenabledstate npn_reloadplugins npn_requestread npn_setvalue npn_setvalueforurl npn_status npn_useragent npn_version npn_write ...
NPN_Enumerate - Archive of obsolete content
the callee allocates this array via npn_memalloc().
NPN_GetValueForURL - Archive of obsolete content
if the function succeeds, the result buffer will be allocated with npn_memalloc; the plugin is responsible for freeing the buffer.
NPString - Archive of obsolete content
note: whenever an npstring owns its string data and the data may be released through a call to npn_releasevariantvalue(), the string data must be allocated using npn_memalloc().
NPAPI plugin reference - Archive of obsolete content
npn_memalloc allocates memory from the browser's memory space.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
// don't forget to release on // shutdown to trigger its destruction } // add reference for the caller requesting the object ns_addref(scriptablepeer); *(nsisupports **)value = scriptablepeer; } else if (variable == nppvpluginscriptableiid) { nsiid* ptr = (nsiid *)npn_memalloc(sizeof(nsiid)); *ptr = scriptableiid; *(nsiid **)value = ptr; } return rv; } nperror npp_destroy (npp instance, npsaveddata** save) { if(instance == null) return nperr_invalid_instance_error; // release the scriptable object ns_if_release(instance->pdata); } original document information author(s): arun k.
Choosing the right memory allocator
npn_memalloc npn_memfree npn_memflush javascript api memory allocators there are also routines intended for use within the javascript runtime engine (spidermonkey).
Browser Side Plug-in API - Plugins
npn_memalloc allocates memory from the browser's memory space.
Gecko Plugin API Reference - Plugins
npn_memalloc allocates memory from the browser's memory space.