Fix tcl operator example crashing when run
The example was accessing deleted memory and so sometimes crashed.
This commit is contained in:
parent
13e76c30b3
commit
ca7b77cbd1
1 changed files with 0 additions and 3 deletions
|
|
@ -9,11 +9,9 @@ puts "a = $a [$a str]"
|
||||||
puts "b = $b [$b str]"
|
puts "b = $b [$b str]"
|
||||||
|
|
||||||
set c [$a + $b]
|
set c [$a + $b]
|
||||||
Complex -this $c
|
|
||||||
puts "c = $c [$c str]"
|
puts "c = $c [$c str]"
|
||||||
|
|
||||||
set d [$a * $b]
|
set d [$a * $b]
|
||||||
Complex -this $d
|
|
||||||
puts "a*b = [$d str]"
|
puts "a*b = [$d str]"
|
||||||
|
|
||||||
# Alternative calling convention
|
# Alternative calling convention
|
||||||
|
|
@ -21,7 +19,6 @@ set e [Complex_- $a $c]
|
||||||
puts "a-c = [Complex_str $e]"
|
puts "a-c = [Complex_str $e]"
|
||||||
|
|
||||||
set f [new_ComplexCopy $e]
|
set f [new_ComplexCopy $e]
|
||||||
Complex -this $f
|
|
||||||
puts "f = [$f str]"
|
puts "f = [$f str]"
|
||||||
|
|
||||||
# Call assignment operator
|
# Call assignment operator
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue