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>
This commit is contained in:
Derek Foreman 2017-09-29 13:46:28 -05:00 committed by Pekka Paalanen
parent 5bb8268766
commit f6bbc975d3

View file

@ -57,6 +57,12 @@
This request creates a registry object that allows the client This request creates a registry object that allows the client
to list and bind the global objects available from the to list and bind the global objects available from the
compositor. 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> </description>
<arg name="registry" type="new_id" interface="wl_registry" <arg name="registry" type="new_id" interface="wl_registry"
summary="global registry object"/> summary="global registry object"/>