Platforms to show: All Mac Windows Linux Cross-Platform

Back to FileMappingMBS class.

FileMappingMBS.DeleteSharedMemory(name as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Filemapping and Shared Memory MBS Util Plugin 10.5 ✅ Yes ❌ No ✅ Yes ✅ Yes All
Deletes the shared memory object.

Returns true on success and false on failure.
Called by the destructor if DeleteSharedMemory property is true.

See also:

FileMappingMBS.GetSharedMemoryValue(name as string) as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Filemapping and Shared Memory MBS Util Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries value of shared memory object.

Returns copy of the data.
Since data is stored in blocks of page size (usually 4K), the returned size has additional null bytes on the end to round size up.
If you store text there, you may look for the end of your data, e.g. for JSON do a trim(Chr(0)) to remove the null bytes.

Some examples using this method:

FileMappingMBS.HasSharedMemoryValue(name as string) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Filemapping and Shared Memory MBS Util Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Checks whether shared memory object exists.

FileMappingMBS.SetSharedMemoryValue(name as string, data as MemoryBlock) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Filemapping and Shared Memory MBS Util Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets shared memory value.

Persistent object on Mac/Linux till computer restarts or shuts down.
On Windows object is destroyed when last application referring it quits.

Returns true on success.
Size of the data block will be rounded up to page size.

Some examples using this method:

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...