| 453 | |
| 454 | template <typename T> |
| 455 | int user_alloc_destroy(lua_State* L) noexcept { |
| 456 | void* memory = lua_touserdata(L, 1); |
| 457 | void* aligned_memory = align_user<T>(memory); |
| 458 | T* typed_memory = static_cast<T*>(aligned_memory); |
| 459 | std::allocator<T> alloc; |
| 460 | std::allocator_traits<std::allocator<T>>::destroy(alloc, typed_memory); |
| 461 | return 0; |
| 462 | } |
| 463 | |
| 464 | template <typename T, typename Real> |
| 465 | void usertype_unique_alloc_destroy(void* memory) { |
nothing calls this directly
no outgoing calls
no test coverage detected