summaryrefslogtreecommitdiff
path: root/Examples/test-suite/octave/refcount_runme.m
blob: 9fc01e2933dd40a1e1279d497676b0c9124ab0ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# do not dump Octave core
if exist("crash_dumps_octave_core", "builtin")
  crash_dumps_octave_core(0);
endif

refcount
#
# very innocent example
#

a = A3();
b1 = B(a);
b2 = B.create(a);


if (a.ref_count() != 3)
  error("This program will crash... now")
endif