VFP9 CLEAR CLASSLIB

V

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



CLEAR CLASSLIB Updated

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.

Add comment

About Craig

I'm the co-host of HubShots and the CEO of XEN - helping mid-large B2B companies with their digital marketing and lead generation.

Craig Bailey

Archives

Posts