1. Kieu Parrish
  2. PowerBuilder
  3. Thursday, 12 December 2019 01:58 AM UTC

Please help me the below :

Is NVO with AutoInstantiate checked destroyed automatically in PowerBuilder 2017 ?

Thank you very much!

 

Michael Kramer Accepted Answer Pending Moderation
  1. Thursday, 12 December 2019 12:31 PM UTC
  2. PowerBuilder
  3. # 1

Hi Kieu, AutoInstantiated object have lifecycle like a structure. So it will get garbage collected when there are no more references to the object.

Roland points out a great way to understand WHEN that happens => MessageBox in its destructor event.

HTH /Michael

Comment
  1. Kieu Parrish
  2. Thursday, 12 December 2019 13:07 PM UTC
Thanks, Michael!
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 12 December 2019 03:41 AM UTC
  2. PowerBuilder
  3. # 2

The best way to answer this would be to put a messagebox in the destructor event and run the app.

Comment
  1. Kieu Parrish
  2. Thursday, 12 December 2019 13:07 PM UTC
Thanks, Roland! I will try that.
  1. Helpful
  1. Kieu Parrish
  2. Thursday, 12 December 2019 18:12 PM UTC
It worked! Thank much, Roland!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 12 December 2019 02:13 AM UTC
  2. PowerBuilder
  3. # 3

Hi Kieu;

    Yes ... eventually - most likely when the App finally  shuts-down or your app explicitly calls the GarbageCollect() command.

Regards ... Chris

Comment
  1. Kieu Parrish
  2. Thursday, 12 December 2019 13:06 PM UTC
Thanks, Chris!
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.