Solved

new and dispose

Posted on 1998-02-04
1
126 Views
Last Modified: 2010-04-04
DELPHIer,

Are New and Dispose as same as new and delete in C++ ?

When do I need to use GetMem and FreeMem instead of New and Dispose ?

Andrew
0
Comment
Question by:andrewyu
1 Comment
 
LVL 5

Accepted Solution

by:
julio011597 earned 0 total points
ID: 1358264
Yes, they are the same.

The difference between New/Dispose and GetMem/FreeMem is in use:

New/Dispose want an object as argument, while GetMem/FreeMem want a size in bytes.

In other words, you can think of their difference as the difference in C++ between new/delete and *alloc/free.

HTH, julio
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now