Announcement

Collapse
No announcement yet.

GlobalAlloc...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Peter P Stephensen
    replied
    Thanks...i see your point...

    ------------------

    Leave a comment:


  • Eric Pearson
    replied
    No, DIM AT tells the PB compilers to use pre-allocated memory, and to not de-allocate the memory when the array is released.

    DIM AT is very "soft". For example, when you DIM an array AT a certain location, the array elements are not initialized to zero.

    Look at it this way... If you created a 10k memory block, and then used DIM AT to overlay just 5k of that, how could it release the memory? And since DIM AT has no way of knowing how large the allocated memory block is...

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>

    Leave a comment:


  • Peter P Stephensen
    started a topic GlobalAlloc...

    GlobalAlloc...

    Hi all,

    If i allocate some memory:
    Code:
        dwData = GlobalAlloc(%LPTR, ah.iLen)
    and then use dwData in the following way:
    Code:
        dim temp(10,10) as long at dwData
    is it then ok NOT to use GlobalFree...I would expect PB to take
    over the memory management.

    Regards
    Peter


    ------------------
Working...
X