mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 16:43:05 -05:00
IntrusivePtr<T> is three pointers: object, deleter, LibContext. The default constructors zero them, the copy constructors copy them and take a reference on the object, operator-> and operator* return the object, and the destructors drop a reference and hand the object to the deleter when it was the last one. The last-reference release of a pointer without a deleter needs the object's destructor and the LibContext memory pool and still throws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>