Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/test-suite/octave/refcount_runme.m
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

21 lines
263 B
Matlab

# 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