SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bugfix for TsiLangExpert

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
BenjyKid



Joined: 05 Apr 2006
Posts: 18

PostPosted: Sat Apr 18, 2009 2:42 pm    Post subject: Bugfix for TsiLangExpert Reply with quote

Hi,

could you please fix the following bug in TsiLangExpert because it makes the IDE unstable (even if you hide the exception!).

Code:
  TsiLangExpert = class(TInterfacedObject, IOTAWizard)
  [...]
    {$IFNDEF DELPHI8}
    AddInNotifier: IOTAIDENotifier;//was TsiAddInNotifier;
    {$ENDIF}


Code:
destructor TsiLangExpert.Destroy;
[...]
    try
//      if AddInNotifier <> nil then  //@@@ SZ not needed because setting AddInNotifier to nil will free this
//        AddInNotifier.Free;
    except
    end;


Your code is mixing interfaces and objects. When want to destroy the object, you have a problem because the interface will be freed when the refcount is set to 0. But it is not really possible for you to tell if that happened or not. So you don't know if you need to free the interface. You will either free your object another time, or you might even free something else. Shocked

The solution is very easy. Just change the type of the AddInNotifier to IOTAIDENotifier. Then you're only using the interface version. The interface will be freed when you set it to nil.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Mon Apr 20, 2009 6:12 am    Post subject: Reply with quote

Hi,

Thnak you for your post. We will integrate your suggestion.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group