Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Leaking GDI objects
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Leaking GDI objects

 Post Reply Post Reply
Author
Message
PhilM View Drop Down
Groupie
Groupie


Joined: 24 March 2009
Location: United Kingdom
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhilM Quote  Post ReplyReply Direct Link To This Post Topic: Leaking GDI objects
    Posted: 24 March 2009 at 11:24am
When we load the command bars object without doing anything with it, it creates 21 GDI font objects and when deleted only clears up 5 of them so it is leaking 16 GDI font objects every time it is loaded and deleted again. Probably another problem with Openedge but thought I would mention it anyway, in case anbody knows an answer. Here is the Openedge code which causes this leak:-
 
DEFINE VAR vcmdbar AS HANDLE NO-UNDO.  
DEFINE VAR chcmdbar AS COM-HANDLE NO-UNDO.
DEFINE VAR stat AS LOG NO-UNDO.
DEFINE FRAME vframe.
  
create control-frame vCmdBar assign
    frame = FRAME vFrame:HANDLE
    name = "CommandBars":u
    HEIGHT-PIXELS = 1
    WIDTH-PIXELS = 1
    hidden = NO
    sensitive = YES.
   
assign 
    chCmdBar = vCmdBar:com-handle
    stat     = chCmdBar:LoadControls( "cmdbar.wrx" , "CommandBars":u).
DELETE WIDGET vcmdbar.
 
Also if you set the visual theme to office2003 it will leak an extra 2 GDI bitmaps and 2 GDI DC's.
 
This also occurs with the Docking pane object but that only leaks 12 GDI font objects.
 
If anybody has any solutions to this it would a great help as this means our screen will use up the GDI resources if it is opened a lot of times, OK the limit per process is 10000 on my PC so with 1 command bar and 2 docking panes I only leak 40 objects each time which means I would have to run it 250 times in one session before it will crash but this isn't very good practice.
 
Thanks
Product: Xtreme SuitePro (ActiveX) version 17.3.0

Platform: Windows 10 / Windows 7

Language: Openedge 11.6

Back to Top
PhilM View Drop Down
Groupie
Groupie


Joined: 24 March 2009
Location: United Kingdom
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhilM Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2009 at 11:08am
We have now fixed this issue by using the FRAME versions of these objects. Must be a problem with the way Openedge/Progress loads and destroys things.
Product: Xtreme SuitePro (ActiveX) version 17.3.0

Platform: Windows 10 / Windows 7

Language: Openedge 11.6

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.