M
ManicQin
hello ya'll.
It's my 1st post here, so be gentle.
I'm trying to build my own C++ framework (just for the fun of it), I'm
happy to say that it is a great way and I really incourge people to
learn c++ and design pattern in this way.
I decided that I need to add my own memory allocation to the frame work
- and still just for the fun of it (and because it could really speed
my system and stuff).
after contemplating on the idea I had a few thoughts:
a) I should create an interface lets say "allocatable" (or something)
and classes will inherit lets say... "allocate" function (i'm open for
new names )
which basicly means that i'm going to lose the constructor abillty (fix
me if i'm wrong)!
b) should I overload new?
c) how can i globalize the "allocate/new/what ever" function in a way
that a new class wont need to overload the new operator - consider that
i dont know the size of the classes.
i'll be happy to read your thoughts and any other references
It's my 1st post here, so be gentle.
I'm trying to build my own C++ framework (just for the fun of it), I'm
happy to say that it is a great way and I really incourge people to
learn c++ and design pattern in this way.
I decided that I need to add my own memory allocation to the frame work
- and still just for the fun of it (and because it could really speed
my system and stuff).
after contemplating on the idea I had a few thoughts:
a) I should create an interface lets say "allocatable" (or something)
and classes will inherit lets say... "allocate" function (i'm open for
new names )
which basicly means that i'm going to lose the constructor abillty (fix
me if i'm wrong)!
b) should I overload new?
c) how can i globalize the "allocate/new/what ever" function in a way
that a new class wont need to overload the new operator - consider that
i dont know the size of the classes.
i'll be happy to read your thoughts and any other references