Posted on January 6, 2005. Filed under: Visual FoxPro |

Here’s welcome news. I was browsing through the new VFP9 features and this one caught my eye:

The CLEAR CLASSLIB command now automatically executes a CLEAR CLASS command on each class in the specified class library. Any errors that might occur during release of individual classes (e.g., class in use) are ignored.

Why is this good? Well in our systems we often have a main exe file that calls .app files. When we want to overwrite the app files (eg as part of an upgrade) we sometimes run into problems with class libraries being held in memory.
No problem you’d think, but we found out the hard way that each class had to be cleared before the class library was completely cleared. If not then the app was still locked. (I should explain that the app loads the class library on the Init() say).
So we had this elaborate procedure for cycling through classes, releasing them and then releasing the class library.
But all that is much easier now with VFP9.


Make a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: