Safe Static Initialisation and Cleanup in Libraries

Static initialization is utilized to ensure that values are constructed before main(), making them available for use immediately and allowing important prerequisites to be established. However, the initialization of these values is more complex than it first appears. Statically linked or dynamically loaded libraries also need their own dependencies, global variables, and lifetime management making the picture more complex when we use other people’s code this way.

In this session, we will explore how applications and libraries handle initialization and discuss methods for building safe initialization mechanisms in our libraries. Whether you develop and distribute code as a library or SDK, or you are simply curious about how application initialization happens, this session is for you.

Image

Ashley Roll

Ashley has 30 years of experience as a software engineer and architect in Brisbane, Australia. He has worked in large and small projects spanning web applications, desktop applications, business systems as well as embedded hardware and firmware.

When

July 21-24, 2024

LinkedIn

CppNorth Group