Class · inherits Instance
MemStorageConnection
Represents a live binding created by Bind() on MemStorageService
that runs a callback whenever a memory-storage key changes.
About MemStorageConnection
A MemStorageConnection is the object returned by the Bind() and
BindAndFire() methods of MemStorageService. It wraps the underlying
subscription to a memory-storage key: while the connection is retained, the
callback supplied at bind time is invoked on each update to that key. The
connection is parented to the MemStorageService that created it.
Calling MemStorageConnection.Disconnect, or allowing the object to
be destroyed, detaches it and stops any further callbacks.
Methods 1
Disconnect
() → ()PluginEnds the binding so its callback no longer runs when the associated memory-storage key changes.Detaches the connection from its parent
MemStorageServiceand disconnects the underlying subscription, so the callback supplied when the connection was created is no longer invoked when the key is updated. This is also called automatically when theMemStorageConnectionis destroyed. Once disconnected, a connection cannot be re-established; bind again to resume receiving updates.
MemStorageConnection also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.