MQL4参考 普通函数 ResourceFree


The function deletes dynamically created resource (freeing the memory allocated for it).

bool  ResourceFree(
   const string  resource_name      // resource name



[in] Resource name should start with "::".

Returned value

True if successful, otherwise false. To get information about the error, call the GetLastError() function.


ResourceFree() allows mql4 application developers to manage memory consumption when actively working with resources. Graphical objects bound to the resource being deleted from the memory will be displayed correctly after its deletion. However, newly created graphical objects (OBJ_BITMAP and OBJ_BITMAP_LABEL) will not be able to use the deleted resource.

The function deletes only dynamic resources created by the program.

See also

Resources, ObjectCreate(), PlaySound(), ObjectSetString(), OBJPROP_BMPFILE