D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
IO
/
Buffer
/
Filename :
free-i.ri
back
Copy
U:RDoc::AnyMethod[iI" free:ETI"IO::Buffer#free;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"NIf the buffer references memory, release it back to the operating system.;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"3for a _mapped_ buffer (e.g. from file): unmap.;To;;0; [o; ; [I"4for a buffer created from scratch: free memory.;To;;0; [o; ; [I"<for a buffer created from string: undo the association.;To:RDoc::Markup::BlankLine o; ; [I"OAfter the buffer is freed, no further operations can't be performed on it.;T@o; ; [I"5You can resize a freed buffer to re-allocate it.;T@o:RDoc::Markup::Verbatim; [I"%buffer = IO::Buffer.for('test') ;TI"buffer.free ;TI"2# => #<IO::Buffer 0x0000000000000000+0 NULL> ;TI" ;TI"buffer.get_value(:U8, 0) ;TI"R# in `get_value': The buffer is not allocated! (IO::Buffer::AllocationError) ;TI" ;TI"buffer.get_string ;TI"S# in `get_string': The buffer is not allocated! (IO::Buffer::AllocationError) ;TI" ;TI"buffer.null? ;TI"# => true;T:@format0: @fileI"io_buffer.c;T:0@omit_headings_from_table_of_contents_below0I"free -> self ;T0[ I"();T@4FI"Buffer;TcRDoc::NormalClass00