Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

R class

From Wiki
Jump to: navigation, search
Article Metadata
Created: tote_b5 (22 Mar 2007)
Last edited: hamishwillee (26 Jul 2012)


R classes are proxies for objects owned elsewhere. There are two main motivations for this:

  • The real object is owned by a server in a different thread or address space, or
  • the real object’s implementation must be hidden from the client.

The following are key characteristics of R objects:

  • They contain a handle that is used to pass on requests to other objects
  • They are opened using an "open" function particular to the R class, and closed using a "close" function particular to the class. An R object must be closed once if it has been opened. Generally, the resource associated with an R object is closed automatically if the thread which opened the object terminates.
  • They have no explicit constructor, destructor, copy constructor or assignment operator.

It's also worth noting that

  • There is no common base class for all R classes
  • The initialisation function has a variety of names: also possible are Open(), Create(), Allocate(), etc.
  • The termination function has a variety of names: also possible are Close(), Destroy(), Free(), etc.
  • Since R classes own external resources, there is a requirement for cleanup: this is handled in various ways depending on the class.

See Also

This page was last modified on 26 July 2012, at 06:16.
47 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.