Skip to content

Commit bc1b378

Browse files
committed
added persistance / serialization
1 parent b75139c commit bc1b378

28 files changed

+13172
-167
lines changed

_downloads/CircularReferenceExample.ipynb

Lines changed: 118 additions & 63 deletions
Large diffs are not rendered by default.

_downloads/memcount.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
class MyChild(object):
2020
def __init__(self, parent):
21-
self.parent = parent
21+
#self.parent = parent
2222
# if a weak ref is used, then no memory leak.
23-
#self.parent = weakref.proxy(parent)
23+
self.parent = weakref.proxy(parent)
2424

2525
## store some data so it will use appreciable memory
2626
## multiply by 1234 to reduce interning
@@ -55,4 +55,4 @@ def __del__(self):
5555
print "ref count:", sys.getrefcount(p)
5656
print "mem_use: %f MB"%mem_check.get_mem_use()
5757
del p
58-
gc.collect()
58+
print "collected", gc.collect()

_sources/index.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ In This Collection
33

44
.. ifslides::
55

6-
+----------------------+
7-
| Topics: |
8-
+======================+
9-
| .. toctree:: |
10-
| :maxdepth: 1 |
11-
| |
12-
| weak_references |
13-
+----------------------+
6+
+-------------------------------+
7+
| Topics: |
8+
+===============================+
9+
| .. toctree:: |
10+
| :maxdepth: 1 |
11+
| |
12+
| weak_references |
13+
| persistance_serialization |
14+
+-------------------------------+
1415

1516
.. ifnotslides::
1617

@@ -21,6 +22,7 @@ In This Collection
2122
:maxdepth: 1
2223

2324
weak_references
25+
persistance_serialization
2426

2527
.. rst-class:: credit
2628

0 commit comments

Comments
 (0)