You Here : Home > Linux

Object::Destroyer 2.00

OS Support:


Publisher Old version


March 29 2012


Object::Destroyer 2.00


Object:: destructor can manufacture objects with circular references to destroy an object using normally.SYNOPSIS:: Destroyer; # # Use a destroyer autonomous leave something when it falls off # # scope BLOCK: (my $ tree = HTML:: TreeBuilder-> new_from_file ( 'somefile.html'); tree my $ sentry = Object:: Destroyer-> new ($, 'delete ') # # Here you can die in any safety, service, dial the last block or next BLOCK. # # The tree will be removed automatically) # # Use it to break circular references (my $ var, $ var = $ var; my $ sentry = Object:: Destroyer-> new (sub (undef $ var)) # # No more memory leak! # # $ Var will be published when $ sentry leaves the block) # # Can Destroyer be used as packaging almost transparent # # affect the normal method calls. ($ = My Big Mess: Custy:: Mess-> new; print $ Mess-> Hello;) large package:: Crusty:: Mess; sub new (my $ self = bless (), shift; $ self-> populate; return Object:: Destroyer-> new ($ self, 'release')) sub hello ( "Hello world!" Sub output () ... actual code to clean the memory ...) One of biggest problem with working with large Trees embedded object is implemented in a way a child node to see its parent. The best way is to add a reference to the child results in a reference parent.This "circular", where A refers to B refers to A. Unfortunately, the garbage collector uses perl when running is not capable of knowing whether or not something else refers to the circular references.In practical terms, this means that trees subject to a lexically scoped variable (eg my $ object = tree-> new) will not be cleaned if they are out of reach, as normal variables. The result is a memory leak for The Life of this process, which is a bad thing when using mod_perl processes or others who live a long time.Object:: Destroyer allows the creation of "Destroy" handles . The handle is "attached" to the circular relationship, but is not a party. When the handle destroy falls out of scope, it will be cleaned properly, and while being cleaned, it will also force the data structure is also committed to destroying. Object:: destructor can call a specified output method on an object (or destroy default method). Alternatively, it can execute arbitrary code name passed to the constructor as a reference code. Requirements: Perl ·

Related Downloads

  • GAMGI 0.14.2
  • GAMGI is a program to build, view and analyze atomic strucure. GAMGI will be useful for: 1) the scientific community working in atomistic modeling that needs a graphical interface to create data entry and to view and analyze the output data,...

  • Bio::DB::BioSQL::SimpleValueAdaptor 1.5.2_100
  • Bio::DB::BioSQL::SimpleValueAdaptor is a Perl module for object description.APPENDIXThe rest of the documentation details each of the object methods. Internal methods are usually preceded with a _get_persistent_slots Title : get_persistent_slots...

    Software Tags

    Object::destroyer | Object::destroyer 2.00 | Object::destroyer Free Download | Object::destroyer Reviews | Download Object::destroyer

    Size :