Opened 13 years ago
Last modified 13 years ago
#2150 closed defect
external function produces memory leaks — at Initial Version
| Reported by: | Willi Braun | Owned by: | probably noone |
|---|---|---|---|
| Priority: | high | Milestone: | 1.9.0 |
| Component: | Backend | Version: | trunk |
| Keywords: | Cc: | Martin Sjölund |
Description
following model generates memory leaks for Integer values.
loadString("
function extF
input Integer x[:];
input Integer s;
output Integer y[size(x,1)];
external \"C\" extF(x,s,y) annotation(Library=\"libExtF.a\");
end extF;
model A
function f
input Integer ins[:];
input Integer in1;
output Integer out[size(ins,1)];
algorithm
out := extF(ins,size(ins,1));
end f;
Integer ints[:] = {0,1,2,3,4};
Integer ou1,ou2,ou3,ou4,ou5;
equation
{ou1,ou2,ou3,ou4,ou5} = f(ints,integer(time));
end A;");
getErrorString();
simulate(A, stopTime=10);
getErrorString();
Note:
See TracTickets
for help on using tickets.
