Skip to content
Snippets Groups Projects
Commit c204fc30 authored by Alberto Miranda's avatar Alberto Miranda :hotsprings:
Browse files

Merge branch 'amiranda/47-the-c-api-should-not-rely-on-unique_ptr' into 'main'

Resolve "The C++ API should not rely on `unique_ptr`"

This MR removes the need to pass a `std::unique_ptr<admire::storage>` argument 
to `register_adhoc_storage` in the C++ API.

Tests are also updated to reflect this change and to remove dependencies with 
`ADM_storage_create()`, which in the future will become an internal function.

Finally, we fix some use-after-free memory management errors due to 
shortcomings in `managed_ctype`s and the creation function of C API types 
themselves. The errors are "fixed" by not deleting the data, which means that
we are now effectively leaking. So that tests pass, we set `detect_leaks=0` in
`ASAN_OPTIONS`.

Closes #47

See merge request !42
parents a4355a10 644f6d59
No related branches found
No related tags found
1 merge request!42Resolve "The C++ API should not rely on `unique_ptr`"
Pipeline #3209 passed
Showing
with 158 additions and 100 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment