|
by: Kepes Krisztian |
last post by:
Hi !
I very wonder, when I get exp. in java with GC.
I'm Delphi programmer, so I get used to destructorin objects.
In Java the final method is not same, but is like to destructor (I has
been think...).
And then I try with some examples, I see, that the Java GC is
|
by: John Hunter |
last post by:
I have a class that uses some extension code I have written and I am
trying to track down some memory leaks, which I presume to be in my
extension code. The class is question is in a python module, not
extension code. I notice some strange behavior; perhaps a guru can
give me a pointer about what this may mean.
If I define the __del__ method in the class C
class C:
...lots of other stuff...
|
by: David MacQuigg |
last post by:
I'm __del__() to decrement a count of instances of a class whenever an
instance is deleted, and I'm getting very erratic behavior. This is
in CPython, which I am told has no problem with reference counts
getting out-of-sync with the deletion of instances. The behavior of
__del__() seems to be very sensitive to the exact sequence of
commands.
The example below is a repeatable test case. It might be possible to
simplify this further,...
|
by: Baoqiu Cui |
last post by:
Today I was playing with a small Python program using Python 2.4
on Cygwin (up-to-date version, on Windows XP), but ran into a
strange error on the following small program (named bug.py):
-------------------------------
#!/usr/bin/python
class Person:
population = 0
def __del__(self):
|
by: phil |
last post by:
> you haven't answered my question, btw: why are you using __del__
> to do something that the garbage collector should do for you?
After more reading it seems I have made an ass of my self on this
subject. Here is my problem at length.
I teach high school geometry. I have created a program with a
scalable graph on which to make drawings to illustrate concepts.
This is working well.
|
|
by: Torsten Bronger |
last post by:
Hallöchen!
When my __del__ methods are called because the program is being
terminated, I experience difficulties in calling functions that I
need for a clean shutdown of my instances. So far, there has been
only one of these functions, and a class-local alias solved the
problem. However, now there are many of them.
Is there a way to detect whether the program is being terminated?
(In this case, I wouldn't care and return from...
|
by: Chris Curvey |
last post by:
I need to ensure that there is only one instance of my python class on
my machine at a given time. (Not within an interpreter -- that would
just be a singleton -- but on the machine.) These instances are
created and destroyed, but there can be only one at a time.
So when my class is instantiated, I create a little lock file, and I
have a __del__ method that deletes the lock file. Unfortunately, there
seem to be some circumstances...
|
by: Gregor Horvath |
last post by:
Hi,
I do not understand why __del__ does not get executed in the following
example.
test.py:
#!/usr/bin/python
class A(object):
def __init__(self):
|
by: George Sakkis |
last post by:
I'm baffled with a situation that involves:
1) an instance of some class that defines __del__,
2) a thread which is created, started and referenced by that instance,
and
3) a weakref proxy to the instance that is passed to the thread
instead of 'self', to prevent a cyclic reference.
This probably sounds like gibberish so here's a simplified example:
==========================================
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|