mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-21 11:08:09 +08:00
Fix component ownership.
When switching from raw pointers toward shared_ptr, the destructor wasn't updated correctly. This patch: - Fixes the issue. - Add two regression tests. - Use address sanitizer for the tests. This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/115
This commit is contained in:

committed by
Arthur Sonzogni

parent
478d7e8bca
commit
91c5954fe2
@@ -231,6 +231,7 @@ if (FTXUI_BUILD_TESTS AND ${CMAKE_VERSION} VERSION_GREATER "3.11.4")
|
||||
endif()
|
||||
|
||||
add_executable(tests
|
||||
src/ftxui/component/component_test.cpp
|
||||
src/ftxui/component/container_test.cpp
|
||||
src/ftxui/component/input_test.cpp
|
||||
src/ftxui/component/radiobox_test.cpp
|
||||
@@ -252,6 +253,8 @@ if (FTXUI_BUILD_TESTS AND ${CMAKE_VERSION} VERSION_GREATER "3.11.4")
|
||||
target_include_directories(tests
|
||||
PRIVATE src
|
||||
)
|
||||
target_compile_options(tests PRIVATE -fsanitize=address)
|
||||
target_link_libraries(tests PRIVATE -fsanitize=address)
|
||||
|
||||
set_property(TARGET tests PROPERTY CXX_STANDARD 17)
|
||||
|
||||
|
Reference in New Issue
Block a user