Is object clearing/array deallocation really necessary in VB6/VBA (Pros/Cons?)

前端 未结 5 2466
暗喜
暗喜 2021-02-20 12:33

A lot of what I have learned about VB I learned from using Static Code Analysis (Particularly Aivosto\'s Project Analyzer). And one one of things it checks for is whether or not

5条回答
  •  攒了一身酷
    2021-02-20 13:06

    Have you read this Aivosto web page (from the creators of Project Analyzer)?

    If you are using static variables, it's important to reclaim the memory they occupied when you don't need the variables any more. With dynamic variables memory isn't so much of a problem, because they are destroyed when the procedure ends.

    In other words, you don't need to worry about clearing ordinary, non-static, local variables.

提交回复
热议问题