小编Yos*_*fki的帖子

使用 _CrtDumpMemoryLeaks 向控制台显示数据

我正在使用_CrtDumpMemoryLeaks运行良好的函数,但在文档中承诺不仅返回 true 或 false 还打印一些信息。

我尝试使用:

_CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG );
Run Code Online (Sandbox Code Playgroud)

但我的一些代码在屏幕上没有出现。

#define _CRTDBG_MAP_ALLOC 
#include <stdlib.h>
#include <crtdbg.h>   
#include <stdio.h>
#include <string.h>

int main() {
slist* students = 0;
clist* courses = 0;
char  c;
char  buf[100];
int   id, num;

malloc(100);
_CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG );


printf("there is memmory leaks?: %d\n",_CrtDumpMemoryLeaks());
system("pause");

return 0;
}
Run Code Online (Sandbox Code Playgroud)

输出没有关于内存泄漏的数据......为什么会这样?

顺便说一下,输出是

是否有内存泄漏?: 1 按任意键继续。. .

c c++ visual-studio-2010

6
推荐指数
2
解决办法
5948
查看次数

使用SOAPUI中的键盘切换请求和响应

我正在使用SoapUi的免费版本我真的想要使用键盘从请求和响应窗口切换我发现ctrl + alt + tab应该做的工作但似乎Windows快捷方式阻止它我怎么能解决这个问题?

keyboard-shortcuts hotkeys soapui root

5
推荐指数
1
解决办法
1690
查看次数

发布工件很慢

在我的构建日志结束时,我有以下内容:

[15:16:22]: Publishing artifacts (25m:29s)
[15:16:22]: [Publishing artifacts] Paths to publish: [automation/artifacts]
[15:16:23]: [Publishing artifacts] Sending files
Run Code Online (Sandbox Code Playgroud)

我试着阅读代理日志并得到了这个

[2013-05-02 15:16:23,023]   INFO -    jetbrains.buildServer.AGENT - Start: Sending files 
[2013-05-02 15:41:51,214]   INFO -    jetbrains.buildServer.AGENT - Done publishing artifacts to , total files published: 22 
Run Code Online (Sandbox Code Playgroud)

文物的大小272 MB.在过去,这部分过程不到半分钟.

我在哪里可以找到有关该操作的更多数据?

teamcity agents

5
推荐指数
1
解决办法
2161
查看次数

确定Manofst [T]的T是否是一个集合

目前我有这个:

private def isCollectionLike[T](manifest: Manifest[T]):Boolean = {
   manifest.runtimeClass.toString.contains("scala.collection")
}
Run Code Online (Sandbox Code Playgroud)

我不喜欢这个解决方案,你能说一个更好的解决方案吗?

reflection scala manifest

5
推荐指数
1
解决办法
94
查看次数

运行时期间构造函数的数量和java.math.BigDecimal的编译时间不匹配

我定义了一个名为BigDecimalWithAttrDisplay的新类,具有以下实现:

class BigDecimalWithAttrDisplay extends BigDecimal{
    String display;
    BigDecimalWithAttrDisplay(String val){super(val)}
    public String toString(){
        "BigDecimalWithAttrDisplay{val=${super.toString()}, display='$display'}";
    }
}
Run Code Online (Sandbox Code Playgroud)

当我尝试运行使用此类的代码时,我得到:

java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.math.BigDecimal do not match. Expected 17 but got 18
at groovy.lang.MetaClassImpl.selectConstructorAndTransformArguments(MetaClassImpl.java:1381)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.selectConstructorAndTransformArguments(ScriptBytecodeAdapter.java:234)
at com.e4x.auto.services.checkout.testapi.model.response.BigDecimalWithAttrDisplay.<init>(BigDecimalWithAttrDisplay.groovy:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:71)
at org.codehaus.groovy.runtime.callsite.ConstructorSite.callConstructor(ConstructorSite.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:194)
Run Code Online (Sandbox Code Playgroud)

有什么问题,我该如何解决?

java groovy exception runtime-compilation

2
推荐指数
1
解决办法
4491
查看次数

使用Visual Studio 2010在C语言中使用宏来切换语句

我正在尝试做这样的事情

#define GETCART1 0;
#define GETCART2 1;

void helper(int *Array,int length,int counter, int option){
    if (length > counter){
        switch(option){
        case (GETCART1) :

            break;
        }//switch
    }
}
Run Code Online (Sandbox Code Playgroud)

我得到编译错误,当我更换GETCART1使用0其作品的罚款.这是为什么?

c macros visual-studio-2010

0
推荐指数
1
解决办法
320
查看次数