Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
f8af7b46
Kaydet (Commit)
f8af7b46
authored
Mar 01, 2010
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#7637: update discussion of minidom.unlink() and garbage collection
üst
343facab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
xml.dom.minidom.rst
Doc/library/xml.dom.minidom.rst
+6
-16
No files found.
Doc/library/xml.dom.minidom.rst
Dosyayı görüntüle @
f8af7b46
...
...
@@ -85,22 +85,12 @@ document: the one that holds all others. Here is an example program::
dom3 = parseString("<myxml>Some data</myxml>")
assert dom3.documentElement.tagName == "myxml"
When you are finished with a DOM, you should clean it up. This is necessary
because some versions of Python do not support garbage collection of objects
that refer to each other in a cycle. Until this restriction is removed from all
versions of Python, it is safest to write your code as if cycles would not be
cleaned up.
The way to clean up a DOM is to call its :meth:`unlink` method::
dom1.unlink()
dom2.unlink()
dom3.unlink()
:meth:`unlink` is a :mod:`xml.dom.minidom`\ -specific extension to the DOM API.
After calling :meth:`unlink` on a node, the node and its descendants are
essentially useless.
When you are finished with a DOM tree, you may optionally call the
:meth:`unlink` method to encourage early cleanup of the now-unneeded
objects. :meth:`unlink` is a :mod:`xml.dom.minidom`\ -specific
extension to the DOM API that renders the node and its descendants are
essentially useless. Otherwise, Python'
s
garbage
collector
will
eventually
take
care
of
the
objects
in
the
tree
.
..
seealso
::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment