| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | free() |
G'Day Roy,
-=> Quoting Roy Mcneill to Frank Adam <=-
FA> When Prog1 gets it's slice back it goes and returns ptr which is no
FA> longer the same animal,
RM> ptr is the same, it's just the block of memory that it points to
RM> that may have changed. And since your code has already freed that
That is what i meant.
RM> Nothing actually wrong with returning ptr after it's been freed,
RM> it's just pointless. Unless it's used to return an error if
RM> something in the function failed (a bit obfuscated for my taste,
RM> unless fully commented...)
As i've said in an earlier mssg, it did return the correct string
properly, even after it was freed, at one stage i executed a few more
functions just to see, how long it'll take until it gets corrupted, got
tired of waiting, the string was still in there.
Of course it's not advisable, and it was basically just a test.
L8r Frank (fadam{at}ozemail.com.au).
___ Blue Wave/DOS v2.21
--- Maximus 3.01
* Origin: The Software Parlour (3:635/544)SEEN-BY: 50/99 620/243 623/630 632/349 635/503 544 727 711/401 409 410 413 SEEN-BY: 711/430 808 809 932 934 712/515 713/888 714/906 800/1 @PATH: 635/544 50/99 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.