Skip to content

unique_ptr size is twice bigger than void* or std::unique_ptr #1

Open
@X547

Description

@X547
std::unique_ptr<Object> ptr1;
unique_ptr<Object> ptr2;

printf("sizeof(ptr1): % " B_PRIuSIZE "\n", sizeof(ptr1)); // 8
printf("sizeof(ptr2): % " B_PRIuSIZE "\n", sizeof(ptr2)); // 16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions