[*] Catch most stls control-block allocation failure

This commit is contained in:
Reece Wilson 2024-03-15 08:41:47 +00:00
parent 5ebb8b0fa8
commit 58d572d52f

View File

@ -77,8 +77,18 @@
name ## Shared_t name ## Shared(T &&... args) \
{ \
auto ptr = name ## New(AuForward<T &&>(args)...); \
if (!ptr) return {}; \
return name ## Shared_t(ptr, name ## Release); \
if (!ptr) \
{ \
return {}; \
} \
AUROXTL_COMMODITY_TRY \
{ \
return name ## Shared_t(ptr, name ## Release); \
} \
AUROXTL_COMMODITY_CATCH \
{ \
return {}; \
} \
}
#endif