Module: XDry::RetainPolicy::COPY

Defined in:
lib/xdry/boxing.rb

Class Method Summary collapse

Class Method Details

.release(out, expr) ⇒ Object



35
36
37
# File 'lib/xdry/boxing.rb', line 35

def self.release out, expr
  out << "[#{expr} release]";
end

.release_and_clear(out, var_name) ⇒ Object



39
40
41
# File 'lib/xdry/boxing.rb', line 39

def self.release_and_clear out, var_name
  out << "[#{var_name} release], #{var_name} = nil;";
end

.retain(expr) ⇒ Object



31
32
33
# File 'lib/xdry/boxing.rb', line 31

def self.retain expr
  "[#{expr} copy]"
end