On Friday, January 14, 2011 05:07:45 am Jussi Lahtinen wrote:
Hi!
I was adding some test for pointer arithmetic when noticing this.
GambasTester will pass, but when you close main form, signal 11 will rise.
Commenting out Free(pp) from mTest: line 1070, will prevent crash.
Gambas 3 rev 3452
True, and that is my only usage for them,
except GambasTester which is supposed to test every command
for possible errors.
Jussi
On Fri, Jan 14, 2011 at 05:29, Ian Haywood ihayw...@iinet.net.au wrote:
On Fri, Jan 14, 2011 at 8:41 AM, Demosthenes Koptsis
demosthen...@gmail.com wrote:
:)
Aaaa... of course, pointer is not correct to free after pp += 4.
Though, result shouldn't be signal 11.
It could not be different.
I mean Gambas should handle this without crash,
but of course this is anyhow end of execution.
I still would like to see error message with according line
Jussi i can post here the cases of pointer's mis-usage from my book and
you can add any of them in your project freely.
1) Assign new address to an existing pointer drives to memory leak.
The first address cannot be freed directly.
' Gambas module file
Public Sub Main()
Dim pPointer1 As
Hi!
I was adding some test for pointer arithmetic when noticing this.
GambasTester will pass, but when you close main form, signal 11 will rise.
Commenting out Free(pp) from mTest: line 1070, will prevent crash.
Gambas 3 rev 3452 @ Ubuntu 10.10 64bit
Jussi
GambasTester-0.9.18.tar.gz
Hi!
I was adding some test for pointer arithmetic when noticing this.
GambasTester will pass, but when you close main form, signal 11 will rise.
Commenting out Free(pp) from mTest: line 1070, will prevent crash.
Gambas 3 rev 3452 @ Ubuntu 10.10 64bit
Jussi
You are calling Free(pp)
Aaaa... of course, pointer is not correct to free after pp += 4.
Though, result shouldn't be signal 11.
Jussi
2011/1/13 Benoît Minisini gam...@users.sourceforge.net
Hi!
I was adding some test for pointer arithmetic when noticing this.
GambasTester will pass, but when you close main form,
:) Pointers are tricky!
And may be this subject is difficult for BASIC programmers like me.
But in time we can learn their tricks and pay attention to such cases.
In my book i simulate and describe such cases based on
http://www.yolinux.com/TUTORIALS/C++MemoryCorruptionAndMemoryLeaks.html
i do
On Fri, Jan 14, 2011 at 8:41 AM, Demosthenes Koptsis
demosthen...@gmail.com wrote:
:) Pointers are tricky!
yes, the ability to avoid pointers is one of the main advantages of
higher-level languages like Gambas.
I'm curious to know why you guys are so fascinated by them, other than
interfacing
Ian Haywood ha scritto:
On Fri, Jan 14, 2011 at 8:41 AM, Demosthenes Koptsis
demosthen...@gmail.com wrote:
:) Pointers are tricky!
Aaaa... of course, pointer is not correct to free after pp += 4.
Though, result shouldn't be signal 11.
It could not be different.
yes, the
On Fri, 2011-01-14 at 14:29 +1100, Ian Haywood wrote:
I'm curious to know why you guys are so fascinated by them
Ian
For me i just want to describe them for my book about Gambas3, that's
all. In this, is including the tricky part of pointers and the correct
use of them inside a program.
--
11 matches
Mail list logo