By the way I am also wonder can I be sure that address of any buffer never change during executing script?
Code: Select all
Serial := new _serial()
return
class _serial
{
__new()
{
RX := new FIFO(1024)
TX := new FIFO(1024)
msgbox,% RX.adr "`n" TX.adr
}
}
class FIFO
{
adr := 0
size := 0
__new(_size){
static buf ; <---------- How to create separate buffer for each new?
VarSetCapacity(buf, _size, 0)
this.size := _size
this.adr := &buf
}
}