Information => Development => Topic started by: Arnold on January 28, 2015, 08:14:42 AM
Title: Memory leaks with TypeDefProc.o2bas?
Post by: Arnold on January 28, 2015, 08:14:42 AM
Hi Charles,
what is the purpose of \examples\Constructs\TypeDefProc.o2bas? It looks very complicated.
When I try to run the demo, this does fail. When I use TaskManager and look at the process gxo2.exe, I see that the used memory increases until gxo2.exe crashes or until I kill the process.
Is there a logical error in the source code?
Roland
Title: Re: Memory leaks with TypeDefProc.o2bas?
Post by: Charles Pegge on January 28, 2015, 01:30:11 PM
Roland,
An unfortunate C'ism. I will consign it to the buggy folder!
Avoiding typedef functions:
Code: OxygenBasic
function f(sys a) assyslabel
print a
endfunction
declarefunction ptr g(sys a)
'!* g(sys a)
'void (*g)(sys a)
@g=@f
g 45
The constructs folder, contains quite a lot of experimental stuff.