mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +00:00
Avoid reallocating objects post-hoc based on the initializer used.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40038 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1b82abd967
commit
2e18a14485
3 changed files with 47 additions and 45 deletions
|
@ -102,11 +102,12 @@ DEFINE_BLOCK_TYPE(GSDataDeallocatorBlock, void, void*, NSUInteger);
|
|||
* <override-subclass/>
|
||||
* Initialize the receiver to hold memory pointed to by bytes without copying.
|
||||
* When the receiver is deallocated, the memory will be freed using the user
|
||||
* supplied deallocator block.
|
||||
* supplied deallocBlock. Note that passing a block that (either directly or
|
||||
* indirectly) holds a strong reference the receiver will cause a retain cycle.
|
||||
*/
|
||||
- (instancetype) initWithBytesNoCopy: (void*)bytes
|
||||
length: (NSUInteger)length
|
||||
deallocator: (GSDataDeallocatorBlock)deallocator;
|
||||
deallocator: (GSDataDeallocatorBlock)deallocBlock;
|
||||
#endif
|
||||
- (id) initWithBytes: (const void*)aBuffer
|
||||
length: (NSUInteger)bufferSize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue