ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Version 9.2.6 Upgrade Issue - No Layer Exception
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PaulAtMass

United Kingdom
19 Posts

Posted - Nov 20 2020 :  06:10:40  Show Profile  Reply
Hi,
just upgraded to V9.2.6 from V8.6.0. Not a biggy but now get an exception when closing down my app. I've created a TImageEnView component which never got loaded or used (depends what the user does) so there are no layers. When closing down I check if there are any layers to clear before destroying. Calls TImageEnView.GetLayersCount but fLayers is nil so get an exception.


  if FIEViewRmtAnno.LayersCount > 0 then
  begin
    FIEViewRmtAnno.ClearAll;
  end;
  FreeAndNil( FIEViewRmtAnno );
 
function TImageEnView.GetLayersCount: integer;
begin
  result := fLayers.Count;
end;


Suppose I could always add a default layer but just need to check fLayers is assigned in call.

thanks
Paul

xequte

38127 Posts

Posted - Nov 20 2020 :  17:01:25  Show Profile  Reply
Thanks for the report, Paul,

I can't reproduce that, but I will make the code more defensive.

Can I ask why you are clearing the layers before destroying?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PaulAtMass

United Kingdom
19 Posts

Posted - Nov 23 2020 :  06:13:03  Show Profile  Reply
Hi, Thanks for response. Just tidy up code, seemed correct thing to do, clear all dynamically created objects. However presume all layers get cleared in destructor anyway?
Paul
Go to Top of Page

xequte

38127 Posts

Posted - Nov 23 2020 :  22:14:32  Show Profile  Reply
Hi Paul

ImageEn will clean up all the layer data so it is not needed.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: