[SR-3309] Fix pointer deallocate() method inconsistency #45897
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Additional Detail from JIRA
md5: 7c994ee1b772f57d0336f9803e6f2f97
Issue Description:
There's currently an inconsistency between the raw and typed unsafe pointer APIs on what kinds of pointers can be used to deallocate memory. Of the typed pointers, only UnsafeMutablePointer has a deallocate() method, while both raw pointers, UnsafeRawPointer and UnsafeMutableRawPointer, have deallocate(). Adding deallocate() to UnsafePointer is an additive change.
In addition, both raw buffers have deallocate() methods that deallocate all the referenced memory, but neither typed buffer has such a method (although if the typed buffers can deallocate they probably also need to be able to deinitialize...).
The text was updated successfully, but these errors were encountered: