help! access violation pointer

Pemrograman Delphi

Re: help! access violation pointer

Postby leledumbo » 25 Feb 2012, 20:43

Kalo yang itu tidak
leledumbo
Senior Member
 
Posts: 262
Joined: 24 May 2010, 15:58

Re: help! access violation pointer

Postby bee » 28 Feb 2012, 11:05

FreeMem dan GetMem itu peninggalan jaman Turbo Pascal, yg masih basis object bukan class. Org Delphi harusnya lebih biasa pake New dan Dispose. Prinsip dasar dalam bekerja dgn memori di Pascal (atau native compiler lainnya yg tanpa garbage collector) adalah "siapa yg meminta, dia pula yg bertanggung jawab melepas". Kalo ini sampe terlupakan, ya siap2 aja dgn bug2 AV yg sulit dijejak sumbernya. :)
bee
Member
 
Posts: 175
Joined: 12 May 2010, 14:15

Re: help! access violation pointer

Postby D.E » 28 Feb 2012, 11:09

Sepakat!
User avatar
D.E
Senior Member
 
Posts: 638
Joined: 04 May 2010, 18:12

Re: help! access violation pointer

Postby leledumbo » 28 Feb 2012, 11:19

FreeMem dan GetMem itu peninggalan jaman Turbo Pascal, yg masih basis object bukan class. Org Delphi harusnya lebih biasa pake New dan Dispose

New dan Dispose itu aseli dari Pascalnya Kakek Wirth kan? Doi malah gak punya GetMem / FreeMem. Justru kode Delphi yang banyak make GetMem / FreeMem, n New / Dispose terlupakan :'(
leledumbo
Senior Member
 
Posts: 262
Joined: 24 May 2010, 15:58

Re: help! access violation pointer

Postby bee » 28 Feb 2012, 11:21

Eh, masa' sih Mar? Seingatku malah New/Dispose itu bawaan Delphi. Soalnya biasanya pake itu sih. Ah, aku udah pelupa rupanya. Maklum sudah tua. :D
bee
Member
 
Posts: 175
Joined: 12 May 2010, 14:15

Re: help! access violation pointer

Postby leledumbo » 28 Feb 2012, 11:28

leledumbo
Senior Member
 
Posts: 262
Joined: 24 May 2010, 15:58

Re: help! access violation pointer

Postby D.E » 28 Feb 2012, 11:37

Wah berarti saya tulis sepakat buat yang mana ya? :D
User avatar
D.E
Senior Member
 
Posts: 638
Joined: 04 May 2010, 18:12

Re: help! access violation pointer

Postby bee » 28 Feb 2012, 11:42

Mario yg bener. Yg asli pascal malah new/dispose, yg get/freemem itu bawaan borland. Jadi mari kita kembali ke khittah pascal. :D
bee
Member
 
Posts: 175
Joined: 12 May 2010, 14:15

Re: help! access violation pointer

Postby D.E » 28 Feb 2012, 11:43

@bee, @mario, @herux check PM :D
User avatar
D.E
Senior Member
 
Posts: 638
Joined: 04 May 2010, 18:12

Re: help! access violation pointer

Postby mas_kofa » 01 Mar 2012, 20:11

nggawe opo tho?
ketok'e jlimet bgt nganti aku ra mudeng....
User avatar
mas_kofa
Senior Member
 
Posts: 344
Joined: 05 May 2010, 12:03
Location: Jakarta

PreviousNext

Who is online

Users browsing this forum: No registered users and 1 guest

cron