Project

General

Profile

Feature #17831

Updated by dsisnero (Dominic Sisneros) over 3 years ago

``` ruby  
 # mv = Fiddle::MemoryView.new(memory_object) 

 Fiddle::MemoryView#slice(start, length) 
 # Fiddle::MemoryView#slice(range) 
 mv = Fiddle::MemoryView.new(memory_object) 
 mv = Fiddle::MemoryView.new(memoryobj) # 

 returns a new MemoryView object with the same MemoryView#obj     # that is no copying 

 mv = Fiddle::MemoryView.new(memoryobj) 

 while mv 
   puts mv[0] 
   mv = mv.slice(1..-1) 
 end 

 ``` 






 


Back