1. Eric Verhorstert
  2. PowerBuilder
  3. Friday, 6 October 2023 10:24 AM UTC

We converted a PB 12.5 application to PB 2022R2 2819. 

 

I ran a procedure which makes intensive use of oleobject. In PB 12.5 the memory usage is stable at around 50Mb. 

In PB 2022 the memory starts at 50Mb and increases to 1200Mb. The memory is released when we close the IDE.

Tried to reproduce it. Below the code that does not release the memory in PB2022 but works find in PB12.5.

 

 

long i
oleobject lole_json
oleobject lole_jsondataobj
oleobject lole_jsondataobj2
oleobject lole_jsondataobj3

for i = 1 to 10000
lole_json = create oleobject
lole_json.connecttonewobject("Chilkat_9_5_0.jsonobject")

lole_json.clear()

lole_json.AddObjectAt(-1, "header")
lole_jsondataobj = lole_Json.ObjectAt( lole_json.Size - 1)

lole_jsondataobj.AddStringAt(-1, "languageCode", 'eng')
lole_jsondataobj.AddStringAt(-1, "dateTimeIssueing", string(datetime(today()), 'yyyy-mm-ddThh:mm:ssZ'))

lole_json.AddObjectAt(-1, "introduction")
lole_jsondataobj = lole_Json.ObjectAt( lole_json.Size - 1)

// add array sow secondary reference id's
lole_jsondataobj.AddObjectAt(-1, "something")
lole_jsondataobj2 = lole_Jsondataobj.ObjectAt( lole_jsondataobj.Size - 1)

lole_jsondataobj2.AddObjectAt(-1, "line")
lole_jsondataobj3 = lole_Jsondataobj2.ObjectAt( lole_jsondataobj2.Size - 1)
lole_jsondataobj3.AddStringAt( -1, "id", string( i ))

lole_jsondataobj2.AddStringAt( -1, "dateTime", string(today(), 'yyyy-mm-ddThh:mm:ssZ'))

if isvalid( lole_jsondataobj3 ) then destroy (lole_jsondataobj3 )
if isvalid( lole_jsondataobj2 ) then destroy (lole_jsondataobj2 )
if isvalid( lole_jsondataobj ) then destroy (lole_jsondataobj )
if isvalid( lole_json ) then destroy (lole_json )
garbagecollect()
end for

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 6 October 2023 11:15 AM UTC
  2. PowerBuilder
  3. # 1

Hi Eric;

  Please open a support ticket for this issue and attach your test code as a small test case PB App. Thanks.

Regards ... Chris 

Comment
  1. Eric Verhorstert
  2. Friday, 6 October 2023 11:56 AM UTC


Wasn't aware of the support option. Bug ID: 10752 is solved. Tested the solution and solved our problem.



Thanks

Eric
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 6 October 2023 12:26 PM UTC
That's great news Eric... thanks for the feedback! :-)
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.