J
James Palmer
Guest
Consider the following code: DEFINE VARIABLE dtDatum AS DATE INIT TODAY . DEF VAR oBoxDate AS CLASS Progress.Lang.Object. DEFINE VARIABLE lv-i AS INTEGER NO-UNDO. DEFINE VARIABLE lv-j AS INTEGER NO-UNDO. ASSIGN lv-j = 10000. REPEAT lv-i = 1 TO lv-j: assign oBoxDate = BOX(dtDatum). CAST (oBoxDate , System.DateTime):ToString("dd MMMM yyyy":U). if valid-object(oBoxDate) then delete object oBoxDate . END. If I run this in the procedure editor interestingly the memory usage is no different with or without the delete object. In fact the memory increases (and increases more on the first run), but basically stays the same after that for each subsequent run. It's as if the memory stays allocated to the process but is marked as unused so the process can reuse. So does that mean the delete object is a waste of effort?
Continue reading...
Continue reading...