[Gambas-user] Circular references?
Richard
richard.j.walker at ...247...
Thu Jan 18 23:22:08 CET 2007
Yes Benoit, I used the "Exit" button on the program's form (as usual). Its
action routine looks like this:
PUBLIC SUB ExitButton_Click()
DIM timerstore AS Stream
DIM n AS Integer
TRY timerstore = OPEN "~/.recordstore" FOR OUTPUT CREATE
IF NOT ERROR THEN
PRINT #timerstore, "$Start_Time,$BaseName,$PathName,$DurationT,
$PartdurationT,$Multipart,";
PRINT #timerstore, "$AlsaDev,$Src_Mode_Stereo,$Dst_Mode_Stereo,
$BitRate,$Compression"
FOR n = 0 TO MAXTIMERNUM
Recordings[CStr(n)].PrintRecord(timerstore)
NEXT
ENDIF
'It is not clear that a FLUSH is necessary, but it can do no harm
FLUSH #timerstore
CLOSE #timerstore
'Make sure that any pending recording will be cancelled
RECFLAG = FALSE
QUITEVENT = TRUE
TIMERTOGEVENT = FALSE
STOPEVENT = FALSE
'Make sure that the Timer doesn't trigger an event (Do I have to? Better
safe than sorry)
Timer1.Enabled = FALSE
ME.CLOSE
END
Although the above code has been complicated by elements introduced to make
the "Exit" button work when it is clicked while another event handler is
running (ie, the event is detected while an event handler is calling WAIT in
a delay loop), yet the Circular Reference warning occurs if I just start and
then stop the program without activating the delay loop or operate any other
control.
Richard
On Thursday 18 Jan 2007 22:00, Benoit Minisini wrote:
> On Thursday 18 January 2007 22:38, Richard wrote:
> > WARNING: circular references detected
> > FSidePanel (1)
> > FDirChooser (1)
> > SidePanel (1)
> > DirChooser (1)
> > ListContainer (1)
> > FileView (1)
> > DirView (1)
> > WARNING: 38 allocation(s) non freed.
> >
> > I have been working with 1.9.47 and trying to get it to produce the same
> > results as I get from 1.9.46a when I compile a program which used the old
> > TableView and now uses the new TableView.
> >
> > There are some differences in the events generated which cause my program
> > to do unexpected things and in trying to nail it down I have managed to
> > generate this error(?) when the program exits (running it in the IDE).
> >
> > Question 1: What sort of "circular reference" is the warning talking
> > about? Question 2: Why are these particular objects listed?
> > Question 3: What does the number in brackets mean?
> > Question 4: Is it serious?
> >
> > Only one of the objects listed has been used on my program's only form;
> > DirChooser. I'm not sure if I even recognise the names of the others.
> >
> >
> > Richard
>
> Do you exit the program cleanly (without using QUIT)?
More information about the User
mailing list