This is a discussion on ODM & C interface question within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hello, Under AIX 5.1 on the pSeries machine, how do I figure out which ODM classes have the vchar ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, Under AIX 5.1 on the pSeries machine, how do I figure out which ODM classes have the vchar type in them for purposes of needing to free() it when I'm done using a result from a query? This page: http://publibn.boulder.ibm.com/doc_l...dm_get_obj.htm says that I need to free vchar pointers in the returned result. I'm fine with that, but it is unclear how to observe a vchar type. This page says the CuAt class has a vchar type for the 'values' field: http://publibn.boulder.ibm.com/doc_l..._Attribute.htm However, when I use odmshow CuAt, I get this: AIX nmi-aix > odmshow CuAt class CuAt { char name[16]; /* offset: 0xc ( 12) */ char attribute[16]; /* offset: 0x1c ( 28) */ nchar value[256]; /* offset: 0x2c ( 44) */ char type[8]; /* offset: 0x12c ( 300) */ char generic[8]; /* offset: 0x134 ( 308) */ char rep[8]; /* offset: 0x13c ( 316) */ short nls_index; /* offset: 0x144 ( 324) */ }; /* columns: 7 structsize: 0x148 (328) bytes data offset: 0x200019f4 population: 129 objects (129 active, 0 deleted) */ So, my question is, do I have to free the 'value' attribute in this class? I would assume no, because it gives the size of the array in the odmshow CuAt, but the documentation pages lead me to believe otherwise. How can I tell for sure? Thank you. I appreciate the help you folks have been giving me over the past couple months. -pete |
| Thread Tools | |
| Display Modes | |
|
|