Original Post
I just thought if it''s bad idea to do many small memory allocations, like:
Vertex *p = new Vertex;
for each vertex, there can be thousands of them.
Is the memory consumption larger, does the system need space for each memory allocation? I''m using VC6.
---------
I also go to a java course and they there have very very weird habits there.
For example have to find if a vertex is isolated in a graph:
it just requires a single loop to go through all sides and look at if one is referencing to the vertex.
But no! They say it''s better to use function that creates a new list of all sides that reference to the vertex (method offered) and then check if that list size equals to 0.
This was just a light example what they teach. But they do this all the time. Allocate memory that they don''t use at all. Are they teaching me bs?