EngineStreamingFreeUpMemory

From Multi Theft Auto: Wiki
Revision as of 01:15, 23 September 2021 by Vadya963 (talk | contribs) (→‎Example)
Jump to navigation Jump to search

20901

[[{{{image}}}|link=|]] Note: This function isn't accurate. The function works more like try to free up at least this amount of bytes. It usually ends up freeing everything that isn't currently needed (which, depending on the scenery might be 1-200 megabytes).

Syntax

bool engineStreamingFreeUpMemory ( int bytes )

Required Arguments

  • bytes: The amount of RAM to be freed up in bytes.

Returns

  • Returns true if the function has succeeded, false otherwise.

Example

This example frees up the streaming memory when the resource starts:

addEventHandler ("onClientResourceStart", resourceRoot,
    function ()
        engineStreamingFreeUpMemory (104857600) -- 100 megabytes
    end
)

Requirements

This template will be deleted.

See Also