[*] Catch most stls control-block allocation failure
This commit is contained in:
parent
5ebb8b0fa8
commit
58d572d52f
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user