Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: closeIfNonNull expression
Topic Summary:
Created On: 18-Aug-2006 16:43
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Chris Jones, on Friday, August 18, 2006 7:09 PM

Answer:
It's defined in </utils/ole.inc>:

void closeIfNonNull(OleAutoObj o) {
if (!null o)
oleCloseAutoObject o
/* the close perm will automatically set o to null for us */
}

Basically it does exactly what it sounds like. If the OleAutoObj is not null it gets closed (whatever closing happens to mean for that particular object).
 18-Aug-2006 16:43
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Hi All,

While working on accessing the OLE objects, I have come across the expression closeIfNonNull. I tried to find an explanation for the above expression in the DXL manual and other sources known to me and I could not find it. Will someone please explain what exactly does this expression mean?
 Thanks in advance

- Krishna
Report this to a Moderator Report this to a Moderator
 18-Aug-2006 18:14
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

Answer Answer
It's defined in </utils/ole.inc>:

void closeIfNonNull(OleAutoObj o) {
if (!null o)
oleCloseAutoObject o
/* the close perm will automatically set o to null for us */
}

Basically it does exactly what it sounds like. If the OleAutoObj is not null it gets closed (whatever closing happens to mean for that particular object).
Report this to a Moderator Report this to a Moderator
 18-Aug-2006 19:09
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks a lot for the explanation.

- Krishna
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.