From: Doug M. <do...@cr...> - 2001-02-21 21:18:06
|
DOH. Someone beet me to it.. (the recursive function I mean ----- Original Message ----- From: "Jordi - IlMaestro - Ministral" <jmi...@or...> To: <dyn...@li...> Sent: Wednesday, February 21, 2001 7:14 AM Subject: Re: [Dynapi-Dev] Continuing Freeing memory > We could easily have a destroy function > > function destroy(object) { > for(var i in object) destroy(i) > delete object > } > > This would appy to any object, not only DynLayers. Maybe DynAPI.destroy() or even > destroy(window) and see what happens. > > Richard Emberson wrote: > > > ECMAScript Language Specification > > http://www.ecma.ch/ecma1/stand/ecma-262.htm > > > > ECMAScript Components Specification > > http://www.ecma.ch/ecma1/stand/ecma-290.htm > > > > >From the spec for javascript (Ecma-262): > > > > 8.6.2.5 [[Delete]] (P) > > When the [[Delete]] method of O is called with property name P, the following > > steps are taken: 1. If O doesn t have a property with name P, return true. > > 2. If the property has the DontDelete attribute, return false. > > 3. Remove the property with name P from O. > > 4. Return true. > > > > 11.4.1 The delete Operator > > The production UnaryExpression : delete UnaryExpression is evaluated as > > follows: > > 1. Evaluate UnaryExpression. > > 2. If Type(Result(1)) is not Reference, return true. > > 3. Call GetBase(Result(1)). > > 4. Call GetPropertyName(Result(1)). > > 5. Call the [[Delete]] method on Result(3), providing Result(4) as the property > > name to delete. > > 6. Return Result(5). > > > > Implimentations of course can vary. > > > > When I wrote my javascript interpreter/compiler 4 years ago I helped (in a very > > small way) > > in debugging the spec. > > > > Richard Emberson > > > > Pascal wrote: > > > > > so: > > > > > > myLayer = new DynLayer > > > > > > delete myLayer > > > > > > destroys it completely? (or do we have to delete every object created within > > > the dynlayer object ?) > > > > > > Pascal Bestebroer (pb...@oi...) > > > Software ontwikkelaar > > > Oberon Informatiesystemen b.v. > > > http://www.oibv.com > > > > > > > -----Oorspronkelijk bericht----- > > > > Van: dyn...@li... > > > > [mailto:dyn...@li...]Namens Eytan > > > > Heidingsfeld > > > > Verzonden: woensdag 21 februari 2001 14:20 > > > > Aan: Dynapi-Dev > > > > Onderwerp: [Dynapi-Dev] Continuing Freeing memory > > > > > > > > > > > > Amazing news flash: > > > > Thanx to Bradford Maness and the delete command in JS I found > > > > that if you > > > > delete objects(repeating objects not elements) in IE memory is freed. > > > > > > > > 8an > > > > > > > > > > > > _______________________________________________ > > > > Dynapi-Dev mailing list > > > > Dyn...@li... > > > > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > > > > > > > > > _______________________________________________ > > > Dynapi-Dev mailing list > > > Dyn...@li... > > > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev --- Outgoing mail is certified Virus Free by AVG Free Edition Download at: http://www.grisoft.com/html/us_index.cfm Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01 |