### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »

# 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`

  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)

    Parameters: | registered – the object that will be registered monitored – the object that will be monitored

`camelot.view.register.``dump_register`()

  Method to see the currently monitored objects, for debugging purposes

`camelot.view.register.``register`(registered, monitored)

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

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

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »

Comments
blog comments powered by Disqus