mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
Pools.lua is now retail Blizzard_SharedXMLBase/Pools.lua, on the SecureTypes and ProxyUtil ports the Menu backport already uses. CreateObjectPool, CreateFramePool and the rest alias the secure variants as on retail, so they return proxies that expose only the pool methods. CreateFramePool takes retail's (frameType, parent, template, resetFunc, forbidden, postCreate, capacity); a table specialization goes through FrameUtil.SpecializeFrameWithMixins; CreateObjectPool works without a reset function; Pool_HideAndSetToDefaults is new. The ClassicAPI-only CreateUnsecuredActorPool and CreateUnsecuredFontStringPoolCollection are gone (nothing used them). Two differences, noted in the header: no secret-value check on release (1.12 has no secret values), and a forbidden pool makes normal frames (no CreateForbiddenFrame). The TOC loads SecureTypes and ProxyUtil before Pools, as retail's does; Pools reads both at load. SecurePoolCollectionMixin:Release calls securecallmethod, now in src/baselib/SecureCall.cpp next to securecallfunction, on both Lua states: object[method](object, ...) with a raw lookup, an error goes to the error handler and the call returns nothing. That follows retail's API documentation; it is not probed. docs/API.md covers it. Verified in game: securecallmethod returns the method's result, a frame pool hides its internals behind the proxy while acquire and release keep the count, and a frame pool collection runs a table specialization's OnLoad, acquires, and releases through securecallmethod.