所以我读到了像
这样的问题ALTER TABLE `MY_TABLE`
PARTITION BY RANGE COLUMNS (`start_time`)
(
PARTITION `p2012` VALUES LESS THAN ('2012-01-01 00:00:00'),
PARTITION `p2013` VALUES LESS THAN ('2013-01-01 00:00:00'),
PARTITION `p2014` VALUES LESS THAN ('2014-01-01 00:00:00'),
PARTITION `p2015` VALUES LESS THAN ('2015-01-01 00:00:00'),
PARTITION `p2016` VALUES LESS THAN ('2016-01-01 00:00:00'),
PARTITION `p2017` VALUES LESS THAN ('2017-01-01 00:00:00'),
PARTITION `pfuture` VALUES LESS THAN (MAXVALUE)
);
因为在Foo bar = *(new Foo());
超出范围并从堆栈中删除后,无法从堆中清除bar
。它有什么实际用途吗?
答案 0 :(得分:2)
Foo& foo = *(new Foo);
delete &foo;
但不要这样做。这将使未来的维护者感到困惑,并且没有充分的理由。使用指针。