Memory Allocation With Doevents

Top  Previous  Next

When a procedure utilizes doevents this means that its execution gets interrupted and other event chains get executed while this procedure is on hold.

As a result, a procedure with doevents in it, as well as all procedures in the chain leading to this procedure, cannot share any memory space with other call chains in the project.

Here is the already familiar call chain example from the Memory Allocation topic. This time, the wroom() procedure contains the doevents statement.

 

memory_alloc_1_doevents

 

Since the doevents statement is in wroom(), both this procedure and all procedures leading to it (just the on_sock_event() in my example) will be allocated exclusive memory:

 

memory_alloc_2_doevents