What unloads modules when the vb6 program exits

The proper way to terminate the vb6 program is to do something like this:

Dim frm As Form
   For Each frm In Forms 
       Unload frm
   Next frm
   end

What cares about forms, what cares about modules in memory?

+2
source share
5 answers

There is no need to explicitly unload modules in VB6. They are automatically unloaded when the last form is unloaded. The language does not support references to standard modules in general, but only to (global) functions and variables defined in it. Since you cannot reference a module, you cannot unload them either.

+4
source

Do not use End, you do not need (never). Then all memory is freed properly.

End, . , , . , , Nothing (, , ). , ( , !).

+3

"" .BAS( : Forms, Classes, UserControls ..), "" , .

. Forms , Form (, - ).

+2

, , , . , CleanUp . - ORDER , , . , .

VB6 END. , , , , . COM- , .

End QuickBASIC Visual BASIC. , VB 4.X . 5.X.

VB 3.X , .

+1

ALL MODULES API ExitProcess()

0
source

Source: https://habr.com/ru/post/1750542/


All Articles