register

Global registry to register that an Python Object should be scheduled for garbage collection, when a QObject is destroyed.

This is used to combine models and views, where the model should be garbage collected once it has no views any more. But as long as it has views, it should be kept alive.

class camelot.view.register.Register[source]

The register that takes care of the dependencies. It monitors an object and when the monitored object is destroyed, its registered object is scheduled for collection.

register(registered, monitored)[source]
Parameters:
  • registered – the object that will be registered
  • monitored – the object that will be monitored
camelot.view.register.dump_register(logger)[source]

Method to see the currently monitored objects, for debugging purposes

camelot.view.register.register(registered, monitored)[source]

Global function to register an object and start monitoring the dependent object

This function takes care of creating the global register as well.

Previous topic

queryproxy

Next topic

remote_signals

This Page