Resource(3I)Resource(3I)NAME
Resource - shared object
SYNOPSIS
#include <InterViews/resource.h>
DESCRIPTION
Resource is a class that provides a simple form of reference counting for shared objects. Every resource has a reference count that is
initially set to zero and must be explicitly incremented through a call to Reference. A resource should not be deleted like other objects;
instead, the static member function unref should be used to unreference the object.
When a resource is unreferenced, the reference count is decremented unless it is already zero. If the count is zero, the object is
destroyed.
PUBLIC OPERATIONS
Resource()
Create a new resource object with its reference count set to zero.
void ref()
Increment the resource's reference count.
void unref()
Decrement the resource's reference count, if it is positive, and delete this if the count is zero.
static void ref(Resource*)
If the resource is not nil, call ref on it. Otherwise do nothing.
static void unref(Resource*)
If the resource is not nil, call unref on it. Otherwise do nothing.
void Reference()
This function is equivalent to ref and is provided solely for backward compatibility. It will be removed in a future version.
void Unreference()
This function is equivalent to unref and is provided solely for backward compatibility. It will be removed in a future version.
FRIEND OPERATIONS
void Unref(Resource*)
This function is equivalent to static unref and is provided solely for backward compatibility. It will be removed in a future ver-
sion.
BUGS
This scheme relies on manual referencing, which is more efficient, but also more dangerous.
When garbage collection is supported by the runtime system, resources will be unnecessary.
InterViews Reference ManualResource(3I)
Check Out this Related Man Page
XtAppReleaseCacheRefs() XtAppReleaseCacheRefs()
Name
XtAppReleaseCacheRefs - decrement the reference counts for cached resources obtained from XtCallConverter().
Synopsis
void XtAppReleaseCacheRefs(app, refs)
XtAppContext app;
XtCacheRef *refs;
Inputs
app Specifies the application context.
refs Specifies a NULL-terminated array of cache references to be decremented.
Availability
Release 4 and later.
Description
XtAppReleaseCacheRefs() decrements the reference count for each XtCacheRef in the NULL-terminated array refs. If any reference count
reaches zero, the destructor registered with XtSetTypeConverter() for that resource type, if any, will be called and the resource removed
from the conversion cache.
An XtCacheRef is a handle to a cached resource value. It is obtained in a call to XtCallConverter().
Usage
Applications and widgets should very rarely need to call this function. The Intrinsics provide two predefined callbacks which can be reg-
istered with an XtCacheRef or an array of XtCacheRef on the destroy callback of a widget or object to automatically call XtAppRelease-
CacheRefs() when the resources are no longer needed. See XtCallbackReleaseCacheRef() and XtCallbackReleaseCacheRefList().
Additionally, the function XtConvertAndStore() which is a higher-level interface to resource converters than XtCallConverter() is passed a
widget or object and automatically registers XtCallbackReleaseCacheRef() on the object's destroy callback if needed. XtCreateWidget() may
also register such callbacks.
Structures
XtCacheRef is an opaque type.
See AlsoXtCallbackReleaseCacheRef(1), XtCallbackReleaseCacheRefList(1), XtCallConverter(1), XtConvertAndStore(1), XtSetTypeConverter(1),
XtDestructor(2).
Xt - Resource Management XtAppReleaseCacheRefs()
Hi all,
I am a newbie to AIX. Can any one give me any idea of resource manager in AIX. How can i use it to schedule jobs at appropriate times. Any pointers to tutorials will b of great help. (4 Replies)
Hi,
I have a requirement to monitor the HACMP Resource Groups. At present in my environment, if the Resource Groups fail over from preferred node to Secondary node we dont get notification.
Can some one help me in creating a scrript. I have more than one RG online. (Max 4 Resource Groups in... (2 Replies)
I have a reference file that needs to remain static and another file that may or may not have duplicate rows that match the reference file. I need help with a command that will delete any duplicate rows from the second file while leaving reference file intact
For example reference file would... (4 Replies)
Hello Guys
Could you please let me know the command to find the resource (vCPU & Memory) capacity limit for the VPAR's (HPUX 11.23) on integrity Virtual host servers running HPUX 11.31 OS.
For eg. I want to know what is the max vCPU and memory that I can assign to one VPAR.
The Base Virtual... (0 Replies)
In HA platforms, there is the concept of a "Scalable Resource Type, which included the sharedaddress" that is used in commonly Web Servers resource groups. The sharedaddress resource type is provided so a developer can use this Resource type to build their own scalable resource group. I see... (1 Reply)