/[lcore]/trunk/lcore.pas
ViewVC logotype

Diff of /trunk/lcore.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 35 by plugwash, Sat Jan 31 00:58:54 2009 UTC revision 36 by plugwash, Thu Feb 5 21:52:57 2009 UTC
# Line 73  Line 73 
73      TSendData          = procedure (Sender: TObject; BytesSent: Integer) of object;      TSendData          = procedure (Sender: TObject; BytesSent: Integer) of object;
74    
75      tlcomponent = class(tcomponent)      tlcomponent = class(tcomponent)
76        private
77          procedure releasetaskhandler(wparam,lparam:longint);
78      public      public
       released:boolean;  
79        procedure release; virtual;        procedure release; virtual;
80        destructor destroy; override;        destructor destroy; override;
81      end;      end;
# Line 94  Line 95 
95        onsenddata         : tsenddata      ;        onsenddata         : tsenddata      ;
96        ondatasent         : tsocketevent      ;        ondatasent         : tsocketevent      ;
97        //connected          : boolean         ;        //connected          : boolean         ;
       nextasin           : tlasio            ;  
       prevasin           : tlasio            ;  
98    
99        recvq              : tfifo;        recvq              : tfifo;
100        OnBgException      : TBgExceptionEvent ;        OnBgException      : TBgExceptionEvent ;
# Line 227  Line 226 
226  procedure exitmessageloop;  procedure exitmessageloop;
227    
228  var  var
   firstasin                             : tlasio     ;  
229    firsttimer                            : tltimer    ;    firsttimer                            : tltimer    ;
230    firsttask  , lasttask   , currenttask : tltask     ;    firsttask  , lasttask   , currenttask : tltask     ;
231    
# Line 285  Line 283 
283    inherited destroy;    inherited destroy;
284  end;  end;
285    
286    procedure tlcomponent.releasetaskhandler(wparam,lparam:longint);
287    begin
288      free;
289    end;
290    
291    
292  procedure tlcomponent.release;  procedure tlcomponent.release;
293  begin  begin
294    released := true;    addtask(releasetaskhandler,self,0,0);
295  end;  end;
296    
297  procedure tlasio.release;  procedure tlasio.release;
# Line 343  Line 344 
344    state := wsclosed;    state := wsclosed;
345    fdhandlein := -1;    fdhandlein := -1;
346    fdhandleout := -1;    fdhandleout := -1;
   nextasin := firstasin;  
   prevasin := nil;  
   if assigned(nextasin) then nextasin.prevasin := self;  
   firstasin := self;  
   
   released := false;  
347  end;  end;
348    
349  destructor tlasio.destroy;  destructor tlasio.destroy;
350  begin  begin
351    destroying := true;    destroying := true;
352    if state <> wsclosed then close;    if state <> wsclosed then close;
   if prevasin <> nil then begin  
     prevasin.nextasin := nextasin;  
   end else begin  
     firstasin := nextasin;  
   end;  
   if nextasin <> nil then begin  
     nextasin.prevasin := prevasin;  
   end;  
353    recvq.free;    recvq.free;
354    sendq.free;    sendq.free;
355    inherited destroy;    inherited destroy;
# Line 752  Line 739 
739    end;    end;
740    interval := 1000;    interval := 1000;
741    enabled := true;    enabled := true;
   released := false;  
   
742  end;  end;
743    
744  destructor tltimer.destroy;  destructor tltimer.destroy;
# Line 904  Line 889 
889    
890    
891  begin  begin
   firstasin := nil;  
892    firsttask := nil;    firsttask := nil;
893        
894    

Legend:
Removed from v.35  
changed lines
  Added in v.36

No admin address has been configured">No admin address has been configured
ViewVC Help
Powered by ViewVC 1.1.22