|
|
|
|
|
|
a***e 发帖数: 1140 | 1 【 以下文字转载自 Linux 讨论区 】
【 原文由 agare 所发表 】
I have a program. Let Tcl do iteration.
In the iteration body, it calls C++ modules.
The question is:
in C++ modules, it creates objects, how can I keep these objects alive
after the call finished. So for the next iteration, these objects are still
available. | a***e 发帖数: 1140 | 2 No one knows?
I hear that using "Tcl_IncrRefCount" can do this. But the problem is:
The manual says it need a new "Tcl_Obj*" first. I don't know how to
hook my objects to this "Tcl_Obj". It seems Tcl only have very few
predefined objects (int,string,list). How to deal with non-defined
objects?
I tried, but failed.
【在 a***e 的大作中提到】 : 【 以下文字转载自 Linux 讨论区 】 : 【 原文由 agare 所发表 】 : I have a program. Let Tcl do iteration. : In the iteration body, it calls C++ modules. : The question is: : in C++ modules, it creates objects, how can I keep these objects alive : after the call finished. So for the next iteration, these objects are still : available.
|
|
|
|
|
|
|