|
Post by shadow008 on Dec 24, 2010 11:57:29 GMT -5
Lets say i have an allocated pointer:
alloc mypointer, value
And i want to delete it because its only temporarily and takes up a huge amount of memory... How do i deallocate it?? Better question to ask is: Whats the b4gl equivalent to c++'s "delete"?
EDIT:
Oh and also, whats the function for the dot product of 2 vectors?
|
|
|
Post by Nicky Peter Hollyoake on Dec 24, 2010 22:41:25 GMT -5
&mypointer = NULL
Only way I'm aware of.
Merry Christmas!
|
|
|
Post by Supermonkey on Dec 25, 2010 4:56:48 GMT -5
Correct me if I'm wrong, but b4gl has no ability to release memory so even setting your pointer to null will lead to a memory leak.
|
|
|
Post by Nicky Peter Hollyoake on Dec 25, 2010 9:53:52 GMT -5
To be honest I didn't think of that, first thing that came on my mind as I was wasted xD but I also assumed that Tom would of made that possible due to making Basic4GL user friendly.
- Nicky
|
|
|
Post by chris857 on Dec 26, 2010 16:26:06 GMT -5
The dot product of two vectors is v1 * v2. Nice and simple.
EDIT:
Tom didn't include pointer deallocation to make it user-friendly.
|
|
|
Post by shadow008 on Jan 13, 2011 11:10:06 GMT -5
Wouldnt this be something useful to implement? Possibly (if ever) in some future update?
|
|
|
Post by matthew on Jan 15, 2011 23:11:58 GMT -5
Maybe Tom will add it to the new version of B4GL. ;D
|
|