Optimised compile and "Dispose"

Discussion in 'Bug Reports' started by agraham, Mar 11, 2008.

  1. agraham

    agraham Expert Licensed User

    There is a behavioural difference between the IDE/legacy compile and optimised compile with "Dispose" on a library object. If you "New" an object from a library and "Dispose" it then in the IDE and legacy compiler the object seems to vanish and trying to reuse with another "New" errors. The optimised compiler however will happily renew it which could be useful in saving memory. Could the IDE/legacy compiler be brought into line with the optimising compiler in a future release?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The difference is that in the IDE you will need to add AddObject before the second "New".
    There is no difference with the memory usage and the optimized compiler supports this AddObject as well.

    The optimized compiler treats AddObject as a compiler directive. So calling it once (with AddObject or with Tools - Add Object) is enough.
     
  3. agraham

    agraham Expert Licensed User

    Thanks Erel. Why didn't I think of that? :sign0161: I must be getting too old for this lark :sign0137:
     
Loading...