summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-09-29 13:46:28 -0500
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-10-02 11:45:56 +0300
commitf6bbc975d30560a4cd73038b1cca840d330ed428 (patch)
tree8ada2f224458ff1cda003374feaebf1672bfe51b
parent5bb82687667ed522615f3263a91c283ced4f7f6a (diff)
protocol: Suggest get_registry not be called frequently
I've heard some complaints that wl_display.get_registry "leaks" server memory because wl_registry has no destructor. While this isn't strictly true - all those resources are freed when the client disconnects - it's a bit of a gotcha for neophytes. Since wl_registry's version is not requested in any way through wl_display.get_registry, we can't add a destructor request without breaking ABI. So let's be a little more clear about the result of getting too many wl_registry objects. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--protocol/wayland.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 29b63be..aabc7ae 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -57,6 +57,12 @@
This request creates a registry object that allows the client
to list and bind the global objects available from the
compositor.
+
+ It should be noted that the server side resources consumed in
+ response to a get_registry request can only be released when the
+ client disconnects, not when the client side proxy is destroyed.
+ Therefore, clients should invoke get_registry as infrequently as
+ possible to avoid wasting memory.
</description>
<arg name="registry" type="new_id" interface="wl_registry"
summary="global registry object"/>