|
|
|
|
|
by mediocregopher
4433 days ago
|
|
There's not a destructor method like there is in C++. I'm not sure why they defined Pool to only interact with interface{}, it seems like it would have been much easier to define an interface which looks like: type PoolObject interface {
Destroy()
}
And have it interact with that. The NewPool func would look like: func NewPool(func() PoolObject) Pool
EDIT: Changed my code a bit |
|