prefer c-style memory management for compatibility