From 8b8b306f5e3d69cac2d6756fe4af0071147f4e69 Mon Sep 17 00:00:00 2001 From: Max Hilbrunner Date: Tue, 2 Jan 2018 22:45:44 +0100 Subject: [PATCH] Variant class (CPP): Update COW info, closes #938 --- development/cpp/variant_class.rst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/development/cpp/variant_class.rst b/development/cpp/variant_class.rst index dc93203e..82c6e6d2 100644 --- a/development/cpp/variant_class.rst +++ b/development/cpp/variant_class.rst @@ -39,7 +39,7 @@ References: - `core/variant.h `__ -Dictionary and Array +Containers: Dictionary and Array -------------------- Both are implemented using variants. A Dictionary can match any datatype @@ -47,14 +47,12 @@ used as key to any other datatype. An Array just holds an array of Variants. Of course, a Variant can also hold a Dictionary and an Array inside, making it even more flexible. -Both have a shared mode and a COW mode. Scripts often use them in shared -mode (meaning modifications to a container will modify all references to -it), or COW mode (modifications will always alter the local copy, making -a copy of the internal data if necessary, but will not affect the other -copies). In COW mode, Both Dictionary and Array are thread-safe, -otherwise a Mutex should be created to lock if multi thread access is +Modifications to a container will modify all references to +it. A Mutex should be created to lock it if multi threaded access is desired. +Copy-on-write (COW) mode support for containers was dropped with Godot 3.0. + References: ~~~~~~~~~~~