New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Threads, shared memory, blessed objects fail to call ->DESTROY method #15839
Comments
From victor.burns@bankofamerica.comThis issue is believed to exist in all 5.10.1+ Perl's and every older Perl as well. Description: ## PERL BUG Example use 5.010001; our $VERSION = 0.1; say 'Hello World!, - Perl shared memory failure to call ->DESTROY detector.'; LEAKER: ## Placing an object into another makes it a sure bet its ## It's strange that the order of the following assignments ## If I'm able to control the order these are unwrapped (destroyed) package Lazy::Crazy; sub DESTROY ## END Perl Info
|
From @jkeenanOn Thu, 26 Jan 2017 12:38:49 GMT, victor.burns@bankofamerica.com wrote:
I would like to confirm the output one is supposed to get from running this program. Running the program as submitted (which, for convenience, I am attaching to this RT), I get: ##### Uncommenting lines 34-36 -- the last 3 lines of the 'LEAKER' block -- and then running the program I get: ##### Is that the output you were expecting? Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From victor.burns@bankofamerica.comYes, when it works properly each of the constructed objects should announce its demise when the ->DESTROY method is called. When script is run as given OR modified in some of the other suggested ways the results will vary including the possibility that none of the objects will announce their demise. Best Regards, Victor Burns | TG Application Architect / Developer & Perl GURU Like us on Facebook Life’s better when we’re connected™ -----Original Message----- I would like to confirm the output one is supposed to get from running this program. Running the program as submitted (which, for convenience, I am attaching to this RT), I get: ##### Uncommenting lines 34-36 -- the last 3 lines of the 'LEAKER' block -- and then running the program I get: ##### Is that the output you were expecting? Thank you very much. -- This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.bankofamerica.com/emaildisclaimer. If you are not the intended recipient, please delete this message. |
From @jdheddenThe bug is that the destructor of an embedded shared object will not be called after the enclosing shared object is destroyed: 1. Create shared objects $xx and $yy. If the above is done with ordinary objects, the the destructors for both $xx and $yy will be called, as expected. One workaround is to code the destructor to actively dereference any embedded objects. The attached code illustrates both the bug and the workaround. |
Migrated from rt.perl.org#130649 (status was 'open')
Searchable as RT130649$
The text was updated successfully, but these errors were encountered: