hasMemory | |||||||
Type | function | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Returns true if the specified amount of memory is available, false otherwise. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Related | Keyword: graphic Property: size, destroyStack, alwaysBuffer, freeSize Command: revUnloadSpeech Function: heapSpace, stackSpace, value, diskSpace Control Structure: function Glossary: Mac OS, return | ||||||
Description | Use the hasMemory function to check whether there's enough memory available for an action (such as displaying a large graphic) before you do it. This function is only partially implemented, and may not return useful values on some platforms. It is included in LiveCode for compatibility with imported SuperCard projects. *Cross-platform note:* On Mac OS systems, the value returned depends on the amount of free memory in the application heap and does not take available temporary memory into account. This means that even if the hasMemory function returns false, there may be enough system memory available for the task, since LiveCode uses temporary memory when necessary. |