Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API newproxy

Last wiki revision 2023-04-19

Creates a zero-size "userdata" object, optionally with a sharable empty metatable. proxy = newproxy(withmetatable) = newproxy(otherproxy)

  • withmetatable : - Whether or not to to create a metatable for the userdata.
  • otherproxy : - If an object previously created by newproxy is passed, the new userdata will share that proxy's metatable.
  • proxy : - A userdata proxy object.
  • This function is an undocumented part of the Lua 5.1 standard library.
  • This function is used by the Secure Handlers framework as a way of providing handles to frames within the restricted environment.
  • Objects created by this function can have a metatable with a method installed to dispatch a function when the object is garbage collected.
  • When using finalizers it is strongly recommended to use a protected call barrier as any errors that escape a finalizer may crash the client.

Source

https://warcraft.wiki.gg/wiki/API_newproxy · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.