[Gambas-user] Question about objects in memory

Benoît Minisini gambas at ...1...
Thu Dec 9 00:33:59 CET 2010


> i have no intension to do something.
> Anyway i dont know how to use such an information.
> 
> i just wanted to know it to describe it in my book.
> 
> Now i am in the chapter of pointers and memory management.
> 
> Something else...
> 
> the "NEW" word in Gambas is like "new" word in C++?
> 
> in the book "Teach Yourself C++ in 21 Days" it says that "The return
> value from new is a memory address" and this is assigned to a pointer.
> 
> for example
> unsigned short int * pPointer;
> pPointer = new unsigned short int;
> 
> The NEW word in Gambas plays the same role?
> 
> For example the
> hButton = NEW Button(ME) AS "MyButton"
> 
> the hButton is a pointer to the memory for the object?
> 
> I am asking this to understand better the subject of pointers...
> 
> Thanks for your time!
> 

The answer is mainly yes. Of course there are differences, Gambas is not C++. 
I suggest you use Java books instead of C++ books, as Gambas is more like Java 
than C++.

Regards,

-- 
Benoît Minisini




More information about the User mailing list