Freeing WinSNMP Descriptors

[This is preliminary documentation and subject to change.]

The WinSNMP programming environment assigns the deallocation of descriptor resources to the WinSNMP implementation or the WinSNMP manager application, depending on which component allocates the memory for the descriptor.

To free the resources for an smiOID or an smiOCTETS descriptor, the following rules apply:

To free the resources for an smiVALUE structure, the following rules apply:

A WinSNMP manager application must check the syntax member of an smiVALUE structure to correctly evaluate the value member of the structure. If the syntax member indicates that the value member is an smiOCTETS or an smiOID descriptor, and the implementation allocated the resources for the descriptor, the application must call SnmpFreeDescriptor. This enables the implementation to free the memory. If the application allocated the resources, it must free the memory using an appropriate function, as indicated earlier.

For additional information, see Allocating WinSNMP Memory Objects.