Results 1 to 4 of 4

Thread: Memory allocation problems and unloading an OCX

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Fort Worth, Texas, USA
    Posts
    264

    Question

    Hello!

    I am running VB5 sp3.
    I've built an OCX and use it in my project.
    It's loaded and the index is set to 0.
    Throughout the program I load and unload the OCX, but the OCX doesn't release the memory it allocated. This is apparent by the windows message "Out of Memory".
    Can anyone (guru types) help me with this?

    Thanks,
    Ken

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    What is the nature of the Control (what does it do?) does it use API calls?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Fort Worth, Texas, USA
    Posts
    264
    Thanks for responding Aaron!

    The control is comprised of 17 timers, 5 picture boxes and 1 shape.

    The control is used as a graphic representation of a box moving around a conveyor system.

    I'm not using any API calls, but it has 4 custom properties and 1 custom event.

    Need more info?

    Thanks,
    Ken

  4. #4
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    If code is still executing in the Timers when your Control is unloaded this could prevent it from really unloading (like a Form), so you could try disabling the Timer controls before your Custom Control is unloaded.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width