Lotus Notes/domino C API memory management mechanism Introduction

Source: Internet
Author: User
Tags data structures ibm developerworks

The Lotus C API Toolkit is a series of Notes/domino-based API programming interfaces and data structures published by Notes/domino, which allows users to develop autonomous applications to access the Domino database, which is widely used in Domino two development The application. The memory management mechanism of the Lotus C API is one of its core components and is essential for developing efficient and practical Domino applications.

This paper introduces in detail the storage structure of Domino database in memory, and the common data structure and API interface provided by Lotus C API for memory management, and illustrates how to follow its memory management mechanism for efficient and practical application development.

Domino Database model

Before introducing the Lotus C API memory management mechanism, first look at the storage model of the typical Domino database (Figure 1). A Domino database consists of the header information of the database and multiple note data structures. The database header information includes title, Categories, class, Design class, ID, Replica info, and so on to describe the relevant properties of the database. The header information is followed by multiple note data structures. Note is a general data structure used by Domino/notes for storage and various information. Note can be divided into design notes (forms, views, folders, navigators, outlines, pages, framesets, agents, and resources), data docume NTS, profiles documents, access control List and collections (indexes). A note can also be divided into note header information and multiple item. Note Header information includes database handle, note ID, originator ID, note class, note flag, and so on. The item in note consists of multiple attributes, such as item name, type, length, and the content of the stored data information.

As shown in Figure 1, the Lotus C API Toolkit uses the "container" (container) model to construct the Domino's database storage model: A Domino database can contain multiple notes, each note contains multiple item, and so on. When you close a container object, all objects contained within the container are automatically closed and released. For example, if you call the Lotus C API to open a database and create a document in the database, when the database is closed, the created document is closed and the storage space is freed. Therefore, it is important to note that before closing the container object, be sure to save the object contained in the container. In addition, when the Lotus C API function notesterm is called to end a Notes session, all memory allocated during the Seesion cycle is freed.

This article turns from: IBM developerWorks China

Please click here to view the full text

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.