Solved

new and dispose

Posted on 1998-02-04
1
125 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

20 Experts available now in Live!

Get 1:1 Help Now