Browse Prior Art Database

Memory Management Information in Object Definition and Resolution

IP.com Disclosure Number: IPCOM000112341D
Original Publication Date: 1994-Apr-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 26K

Publishing Venue

IBM

Related People

Coskun, N: AUTHOR [+2]

Abstract

Disclosed is a technique to manage memory information in object definition and resolution. In System Object Model (SOM), no convention is enforced regarding pass-by-reference and pass-by-value of attributes. Thus, a set of an attribute A may pass a copy and and a get of attribute B may make a copy of the actual attribute. This is especially troublesome when nesting parameter calls, such as __set_A(obj, __get_B(obj)) where A and B are attributes on object obj. In this situation, there is a memory leak.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 100% of the total text.

Memory Management Information in Object Definition and Resolution

      Disclosed is a technique to manage memory information in object
definition and resolution.  In System Object Model (SOM), no
convention is enforced regarding pass-by-reference and pass-by-value
of attributes.  Thus, a set of an attribute A may pass a copy and and
a get of attribute B may make a copy of the actual attribute.  This
is especially troublesome when nesting parameter calls, such as
__set_A(obj, __get_B(obj)) where A and B are attributes on object
obj.  In this situation, there is a memory leak.

      To avoid memory leak, in the SOM interface definition language
file (.IDL file), provide information (pass-by-reference or value)
for each method parameter and return value.  With this information,
the memory can be freed where appropriate.

      Now, assume that there is a nested method invocation of the
form method1(target_object, method2(target_2)).  If both parameter 2
of method 1 and the return value of method 2 are pass-by-value, then
do an automatic free of the return value of mentod 2 after method 1
completes.