B. Windows API Allocation and Cleanup Functions
WHEN DOING .NET COMPACT FRAMEWORK PROGRAMMING, we prefer to write managed code. Sometimes, however, we want to do something—or must do something—that we cannot do with managed code alone. At such times, we call through to the underlying Windows API using the P/Invoke support built into the .NET Compact Framework (see Chapter 3, Platform Invoke).
The Windows API is an object-based programming interface, which is to say that objects are allocated and handles are issued for each object. In managed code, when you create managed objects, the cleanup of memory for those objects is handled for you automatically. This is often referred to as garbage collection, although we prefer calling this automatic ...
Get Programming .NET Compact Framework 3.5 Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.