Opened 17 years ago
Closed 16 years ago
#601 closed defect (fixed)
MakeGlobal does not work
Reported by: | Javier Portugal | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | Various | Version: | 1.1.6 |
Severity: | blocker | Keywords: | |
Cc: |
Description
This code (that worked perfectly on version 1.1.5) does not work from version 1.1.6
Real MiFuncion(Real void)
{
Real a = 3;
Real MakeGlobal(a);
0
};
Real MiFuncion(0);
Real b = a;
Change History (5)
comment:1 Changed 17 years ago by
Status: | new → assigned |
---|
comment:2 Changed 17 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000601 |
---|
Sorry, I cannot reproduce this error.
Please, try to copy this code in a tol file and compile it
This code works prefectly
comment:4 Changed 17 years ago by
This code only fails if you compile it out of a file, in the TOLBase Eval window, with tol -c"...", etc. This is because local object a is not returned by MiFuncion and so is deleted at local scope. When code is writen in a a TOL file compiled at global scope or in a file that is included locally inside a global scope compiled file, the this one handles with a list of globalized objects to ensure them alive until the global file will be deleted, and then all them will be also destroyed. Elsecase its no possible to ensure it and object cannot be globalized.
The only bug is that a warning or error message should be shown to notify this situation to the user to avoid unexpected behaviours.
Are you agree?
comment:5 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Thanks for reporting