Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

删除根节点,内存占用不释放 #42

Open
liushuo1024 opened this issue Nov 20, 2024 · 1 comment
Open

删除根节点,内存占用不释放 #42

liushuo1024 opened this issue Nov 20, 2024 · 1 comment

Comments

@liushuo1024
Copy link

Delete_Storage_Disabled = true;
delete_tree_nodes(&Root_Node);
PointVector ().swap(PCL_Storage);
Rebuild_Logger.clear();
@liushuo1024
Copy link
Author

Delete_Storage_Disabled = true;
delete_tree_nodes(&Root_Node);
PointVector ().swap(PCL_Storage);
Rebuild_Logger.clear();
   可解决
    // 尝试释放内存给操作系统
    if (malloc_trim(0) == 0) {
        std::cout << "Memory successfully trimmed." << std::endl;
    } else {
        std::cout << "Memory trim failed." << std::endl;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant