On Tue, 27 Jun 2000, Dr Wes Munsil wrote:
> A question, and a comment.
>
> 1) What does that mean? Objects don't have types: variables have types, objects
> have classes (http://www.javasoft.com/docs/books/jls/html/4.doc.html#24887).
> o.getClass() is the class of the object. I don't mean to be
The problem is that the code assumes
set dataList [makeTclList $content]
sets the variable 'dataList' to the "TclList object" returned by your
MakeTclList command. Suppose that the Tcl interpreter makes a copy of the
list returned by MakeTclList using its string form. Then your original list
Something has been bothering me about this ref counting stuff for
some time. It just seems like the TclJava ref counting does not
work like regular Tcl ref counting, but I could not put my
finger on exactly why.
I was just looking at the C code, and I noticed that "regular"
Tcl ref counts start a
A question, and a comment.
1) What does that mean? Objects don't have types: variables have types, objects
have classes (http://www.javasoft.com/docs/books/jls/html/4.doc.html#24887).
o.getClass() is the class of the object. I don't mean to be pedantic, but if
there is really some TclBlend requir
There are also problems with the returned TclObject from "getVar", "setVar",
"getResult" of the Interp class. Those TclObjects usually contains CObject
as the internal rep. But TclList is by far the most difficult to deal with.
-- Jiang Wu
[EMAIL PROTECTED]
> -Original Message-
> F
> {
> // We are not supposed to use getClass (); I have never been sure why.
> // In this case, no subclasses are involved anyway, so the result
> // should be the same.
> TclList.append (interp, list, ReflectObject.newInstance (interp,
o.getClass (), o));
>
>
Ack, you should
> A different solution is needed. What about never returning any CObjects in
> TclBlend? Methods such as interp.setVar, interp.getVar, interp.getResult
> still returns TclObject, but the resulting TclObject would not contain
> CObject as the internal rep. For example, any Tcl_Obj can be convert
Here's the test case. There are three files. First I'll tell you what's in them, then
I'll
tell you what's perplexing about the case. Total for the three files is 92 lines of
code.
blah.tcl: the Tcl script that often gets a weird error like 'invalid command name
"java0x3"'.
Four.java: the Java
> > I was thinking about adding a `next' member to CObject, to build a
> > singly-linked list of finalized objects without allocating memory.
> > Unfortunately it would still probably require synchronization.
>
> With careful programming, synchronization should not be a problem. Though I
> don'
I converted all TclList.index(..).toString() into a safer manner using
preserve/release. Then I ran through the tclblend test suite. The bad news
is that there are still hundreds of Tcl_Obj's being leaked.
The tcljava code uses many temporary TclObjects. A few examples of how
these temporary T
> -Original Message-
> From: Jeff Sturm [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 26, 2000 10:23 PM
> To: Jiang Wu
> Cc: [EMAIL PROTECTED]
> Subject: [Tcl Java] Re: [Tcl Java] preserve/release or use GC
>
> Jiang Wu wrote:
> > TclObject listElement = TclList.index(...);
> >
11 matches
Mail list logo