FastLED
3.10.6
Loading...
Searching...
No Matches
◆
make_shared_array
template<typename T>
template<typename Y>
shared_ptr
< Y > make_shared_array
(
size_t
n
)
friend
Definition at line
464
of file
shared_ptr.h
.
464
{
465
T
*
arr
=
new
T
[
n
]();
// Zero-initialize the array
466
if
(
arr
==
nullptr
) {
467
return
shared_ptr<T>
();
// OOM — see make_shared
468
}
469
auto
*
control
=
new
detail::ControlBlock<T, detail::array_delete<T>
>(
arr
,
detail::array_delete<T>
{});
470
if
(
control
==
nullptr
) {
471
delete
[]
arr
;
472
return
shared_ptr<T>
();
// OOM — see make_shared
473
}
474
return
shared_ptr<T>
(
arr
,
control
,
detail::make_shared_tag
{});
475
}
fl::shared_ptr::shared_ptr
friend class shared_ptr
Definition
shared_ptr.h:391
fl::shared_ptr
Definition
shared_ptr.h:155
fl
shared_ptr
Generated on Sun Oct 4 2026 23:09:10 for FastLED by
1.13.2