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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Version 9.2.6 Upgrade Issue - No Layer Exception

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PaulAtMass Posted - Nov 20 2020 : 06:10:40
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
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 23 2020 : 22:14:32
Hi Paul

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

Nigel
Xequte Software
www.imageen.com
PaulAtMass Posted - Nov 23 2020 : 06:13:03
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
xequte Posted - Nov 20 2020 : 17:01:25
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