On Sun, Jun 9, 2024 at 9:25 PM 'Ronald Fenner' via v8-dev <
v8-dev@googlegroups.com> wrote:

> I was implementing the cppgc into my project and found that the
> CppHeap::Create returns a unique ptr where as the CreateParams.cpp_heap is
> just a pointer leading to having to get the pointer from the unique and
> then releasing when setting the param. Considering it's now the preferred
> way to set an embedder cppgc heap maybe the create params should be made a
> unique ptr as well.


That doesn't work the way `CppHeap::Create()` is set up as it takes a
`const CreateParams&`, so we cannot move away and take ownership. This is
not really great API design but it's consistent with
`Isolate::CreateParams` which is much harder to change as every embedder
uses it at this point.

We may change this at some point but really it is introducing some churn
for embedders for code esthetics (the API is not used in many places and
scenarios), so we want to strike a balance when we change it.

-Michael



>
>
> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/fa2f1dbf-b07c-4f10-8198-1929bb74824fn%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/fa2f1dbf-b07c-4f10-8198-1929bb74824fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAH%2BmL5CEhJG5Ln7Jpjo%2B80VCsgRAWYCyLRnvsuX%3D5jBz_cYewA%40mail.gmail.com.

Reply via email to