Date: Friday, January 13, 2006 @ 11:49:17
Author: marc
Path: /cvsroot/carob/carob/doc
Added: memory (1.1)
first draft
--------+
memory | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+)
Index: carob/doc/memory
diff -u /dev/null carob/doc/memory:1.1
--- /dev/null Fri Jan 13 11:49:17 2006
+++ carob/doc/memory Fri Jan 13 11:49:17 2006
@@ -0,0 +1,50 @@
+
+Documentation of memory management in Carob
+-------------------------------------------
+
+
+There is a strict hierarchy among the three main types:
+
+Connection
+ |
+ |_____ Statement
+ | .
+ | .
+ | .
+ \____ Statement
+ |
+ |________ ResultSet
+ | .
+ | .
+ | .
+ |
+ \_______ ResultSet
+
+
+Ownership
+---------
+
+Lines show ownership, so:
+- a Connection owns a number of Statements;
+- each Statement is owned by one and only one Connection;
+- same thing below for Statements and ResultSets
+
+Property means that:
+- the only way to create lower objects is to ask the upper object.
+- the only one allowed to delete a lower object is the upper object.
+
+Connection is owned by the user.
+
+Deletion is obviously recursive.
+
+
+The .close() method
+-------------------
+
+So far, the only way allowed to free resources allowed is to delete
+the connection; this is too restrictive. So the .close() method
+provides partial clean-ups on any object. It *deletes* all lower
+objects owned, frees any remote (database) resources held and frees
+now obsolete local fields as a memory optimisation.
+
+Closed objects can be re-initialized and used again.
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits